gordias.util.array.find_closely_matching_range#
- gordias.util.array.find_closely_matching_range(a: ndarray, b: ndarray) tuple[slice, slice]#
Find ranges for two arrays where they are element-wise equal within a tolerance.
The ranges are returned as slices, one for each array. The tolerance used is the default of the
numpy.isclose()function.- Parameters:
a (numpy.ndarray) – One-dimensional numpy array.
b (numpy.ndarray) – One-dimensional numpy array.
- Returns:
Two slice objects, one for each input array.
- Return type:
- Raises:
ValueError – If either of the arrays is not one dimensional, or not strictly monotonically increasing.