MatchingData.subset_array#
- MatchingData.subset_array(arr, arr_slice, padding, invert=False)[source]#
Extract a subset of the input array according to the given slice and apply padding. If the padding exceeds the array dimensions, the padded regions are filled by reflection of the boundaries. Otherwise, the values in
arr
are used.- Parameters:
- arrNDArray
The input array from which a subset is extracted.
- arr_slicetuple of slice
Defines the region of the input array to be extracted.
- paddingNDArray
Padding values for each dimension.
- invertbool, optional
Whether the returned array should be inverted.
- Returns:
- NDArray
Subset of the input array with padding applied.