bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / util / arraycrop / crop
function
skimage.util.arraycrop:crop
source: /dev/scikit-image/src/skimage/util/arraycrop.py :12
Signature
def crop ( ar , crop_width , copy = False , order = K ) Summary
Crop array ar by crop_width along each dimension.
Parameters
ar: array_like, of rank NInput array.
crop_width: int or SequenceNumber of values to remove from the edges of each axis.
((before_1, after_1),...(before_N, after_N))specifies unique crop widths at the start and end of each axis.((before, after),) or (before, after)specifies a fixed start and end crop for every axis.(n,)ornfor integernis a shortcut for before = after =nfor all axes.copy: bool, optionalIf
True, ensure the returned array is a contiguous copy. Normally, a crop operation will return a discontiguous view of the underlying input array.order: {'C', 'F', 'A', 'K'}, optionalIf
copy==True, control the memory layout of the copy. Seenp.copy.
Returns
cropped: arrayThe cropped array. If
copy=False(default), this is a sliced view of the input array.
Aliases
-
skimage.util.crop