pyinterp.AxisInt64.find_indexes¶
- AxisInt64.find_indexes(self: pyinterp.core.AxisInt64, coordinates: numpy.ndarray[numpy.int64]) numpy.ndarray[numpy.int64] ¶
For all coordinate positions, search for the axis elements around them. This means that for n coordinate
ix
of the provided array, the method searches the indexesi0
andi1
as follow:self[i0] <= coordinates[ix] <= self[i1]
The provided coordinates located outside the axis definition range are set to
-1
.- Parameters:
coordinates – Positions in this coordinate system.
- Returns:
A matrix of shape
(n, 2)
. The first column of the matrix contains the indexesi0
and the second column the indexesi1
found.