From 98245449cb68139fa1aa5b87d63753f488b472cb Mon Sep 17 00:00:00 2001 From: cgohlke Date: Mon, 11 Jun 2012 09:36:29 -0700 Subject: [PATCH] Fix test failures on Python 3 --- skimage/util/dtype.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skimage/util/dtype.py b/skimage/util/dtype.py index 44476e44..b039123c 100644 --- a/skimage/util/dtype.py +++ b/skimage/util/dtype.py @@ -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)