Merge pull request #354 from wiredfool/test_numpy

Py3 fixes
This commit is contained in:
Alex Clark ☺ 2013-09-30 17:10:28 -07:00
commit 41b1021ffe

View File

@ -69,8 +69,8 @@ def test_3d_array():
def _test_img_equals_nparray(img, np):
assert_equal(img.size, np.shape[0:2])
px = img.load()
for x in xrange(0, img.size[0], img.size[0]/10):
for y in xrange(0, img.size[1], img.size[1]/10):
for x in range(0, img.size[0], int(img.size[0]/10)):
for y in range(0, img.size[1], int(img.size[1]/10)):
assert_deep_equal(px[x,y], np[y,x])