Fix automatic copy even when copy=False in crop

This commit is contained in:
Juan Nunez-Iglesias
2015-01-07 11:25:30 +11:00
parent d7138f1a51
commit c96fdb9338
+1 -1
View File
@@ -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: