From c96fdb9338106546326fcd71cc0c067b6506038d Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Wed, 7 Jan 2015 11:25:30 +1100 Subject: [PATCH] Fix automatic copy even when copy=False in crop --- skimage/util/arraypad.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skimage/util/arraypad.py b/skimage/util/arraypad.py index ee0a3c5d..49f89e3d 100644 --- a/skimage/util/arraypad.py +++ b/skimage/util/arraypad.py @@ -1528,7 +1528,7 @@ def crop(ar, crop_width, copy=False, order='K'): The cropped array. If `copy=False` (default), this is a sliced view of the input array. """ - ar = np.array(ar) + ar = np.array(ar, copy=False) crops = _validate_lengths(ar, crop_width) slices = tuple([slice(a, -b) for a, b in crops]) if copy: