mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-30 02:56:19 +08:00
Merge pull request #200 from cgohlke/patch-2
BUG: Fix dtype conversion test failures on Python 3.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user