ewoksndreg.math.crop.array_crop_limits#
- ewoksndreg.math.crop.array_crop_limits(array)[source]#
Calculate array index limits for each dimension to strip invalid value blocks at the edges.
- Parameters:
array (
ndarray)- Return type:
Optional[List[Tuple[int,int]]]- Returns:
A 2-tuple for each array dimension [(lo0, hi0), (lo1, hi1), …] or None when the cropped sub-array is empty.