Fix test failures on Python 3

This commit is contained in:
cgohlke
2012-06-11 09:36:29 -07:00
parent 8141f39a2b
commit 98245449cb
+2 -2
View File
@@ -109,8 +109,8 @@ def convert(image, dtype, force_copy=False, uniform=False):
prec_loss()
if copy:
b = np.empty(a.shape, _dtype2(kind, m))
np.divide(a, 2**(n - m), out=b, dtype=a.dtype,
casting='unsafe')
np.floor_divide(a, 2**(n - m), out=b, dtype=a.dtype,
casting='unsafe')
return b
else:
a //= 2**(n - m)