TemporalAxis.find_index(self: pyinterp.core.TemporalAxis, coordinates: numpy.ndarray[numpy.int64], bounded: bool = False) numpy.ndarray[numpy.int64]

Given coordinate positions, find what grid elements contains them, or is closest to them.

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

  • bounded (bool, optional) – True if you want to obtain the closest value to a coordinate outside the axis definition range.


index of the grid points containing them or -1 if the bounded parameter is set to false and if one of the searched indexes is out of the definition range of the axis, otherwise the index of the closest value of the coordinate is returned.

Return type