From cc72dc96d3d33454efe76c305dda43a34719b46e Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 25 Mar 2014 12:44:50 +0100 Subject: [PATCH] ox.image: don't create array of identical arrays --- ox/image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ox/image.py b/ox/image.py index c38693e..a4ed5ef 100644 --- a/ox/image.py +++ b/ox/image.py @@ -55,7 +55,7 @@ def getImageHash(image_file, mode): # 4 4 5 5 6 6 7 7 # 4 4 5 5 6 6 7 7 image_data = image.getdata() - zone_values = 8 * [[]] + zone_values = [[] for i in range(8)] for pixel_index, pixel_value in enumerate(image_data): zone_values[ZONE_INDEX[pixel_index]].append(pixel_value) for zone_index, pixel_values in enumerate(zone_values):