pyinterp.TemporalAxis.safe_cast#

TemporalAxis.safe_cast(self: pyinterp.core.TemporalAxis, values: numpy.ndarray) numpy.ndarray#

Convert the values of the vector in the same unit as the time axis handled by this instance.

Parameters

values – Values to convert.

Returns

Values converted.

Raises

UserWarning – If the implicit conversion of the supplied values to the resolution of the axis truncates the values (e.g. converting microseconds to seconds).