diff --git a/skimage/exposure/unwrap.py b/skimage/exposure/unwrap.py index 3c52acde..86444aef 100644 --- a/skimage/exposure/unwrap.py +++ b/skimage/exposure/unwrap.py @@ -86,21 +86,15 @@ def unwrap_phase(image, wrap_around=False): mask = np.require(image.mask, np.uint8, ['C']) else: mask = np.zeros_like(image, dtype=np.uint8, order='C') - image_not_masked = np.asarray(image, dtype=np.float32, order='C') - image_unwrapped = np.empty_like(image, dtype=np.float32, order='C') + image_not_masked = np.asarray(image, dtype=np.float64, order='C') + image_unwrapped = np.empty_like(image, dtype=np.float64, order='C') if image.ndim == 1: - image_not_masked = np.asarray(image, dtype=np.float64, order='C') - image_unwrapped = np.empty_like(image, dtype=np.float64, order='C') unwrap_1d(image_not_masked, image_unwrapped) elif image.ndim == 2: - image_not_masked = np.asarray(image, dtype=np.float64, order='C') - image_unwrapped = np.empty_like(image, dtype=np.float64, order='C') unwrap_2d(image_not_masked, mask, image_unwrapped, wrap_around) elif image.ndim == 3: - image_not_masked = np.asarray(image, dtype=np.float64, order='C') - image_unwrapped = np.empty_like(image, dtype=np.float64, order='C') unwrap_3d(image_not_masked, mask, image_unwrapped, wrap_around)