pyinterp.Axis.find_indexes#
- Axis.find_indexes(self, coordinates: numpy.ndarray[dtype=float64, shape=(*), writable=False]) numpy.ndarray[dtype=int64, shape=(*, 2), order='C']#
Find indexes of axis elements surrounding each coordinate.
For each coordinate in the input array, find the indexes
i0andi1such thatself[i0] <= coordinate <= self[i1]. Coordinates outside the axis range are set to -1.- Parameters:
coordinates – Positions in this coordinate system.
- Returns:
A matrix of shape
(n, 2). The first column contains the indexesi0and the second column contains the indexesi1found.