mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-05 14:44:58 +08:00
Fix automatic copy even when copy=False in crop
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user