lentil.subarray#
- lentil.subarray(a, shape, shift=(0, 0))[source]#
Extract a contiguous subarray from a larger array.
The subarray is extracted about the center of the source array unless a shift is specified.
- Parameters:
a (array_like) – Source array
shape (array_like of ints) – Shape of subarray array in
(nrows, ncols)
.shift (array_like of ints) – Relative shift of the center of the subarray in
(row, col)
.
- Returns:
out – Subarray extracted from the source array.
- Return type:
ndarray