From 738953b9461bb6753ae70e39c488b98d1121cba1 Mon Sep 17 00:00:00 2001 From: Jonathan Helmus Date: Wed, 21 Jan 2015 19:37:23 -0600 Subject: [PATCH] image_unwrapped created as ndarray always In unwrap_phase the image_unwrapped variable is created as an ndarray even when image is a masked array. --- skimage/restoration/unwrap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skimage/restoration/unwrap.py b/skimage/restoration/unwrap.py index 36fe0d9d..14f1eafa 100644 --- a/skimage/restoration/unwrap.py +++ b/skimage/restoration/unwrap.py @@ -94,7 +94,8 @@ def unwrap_phase(image, wrap_around=False, seed=None): image_not_masked = np.asarray( np.ma.getdata(image), dtype=np.double, order='C') - image_unwrapped = np.empty_like(image, dtype=np.double, order='C') + image_unwrapped = np.empty_like(image, dtype=np.double, order='C', + subok=False) if image.ndim == 1: unwrap_1d(image_not_masked, image_unwrapped)