pyinterp.TemporalAxis.find_indexes

TemporalAxis.find_indexes(coordinates: numpy.ndarray) numpy.ndarray[source]

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 indexes i0 and i1 as fallow:

self[i0] <= coordinates[ix] <= self[i1]

The provided coordinates located outside the axis definition range are set to -1.

Parameters

coordinates (numpy.ndarray) – Positions in this coordinate system.

Returns

A matrix of shape (n, 2). The first column of the matrix contains the indexes i0 and the second column the indexes i1 found.

Return type

numpy.ndarray