pyinterp.TemporalAxis.safe_cast

TemporalAxis.safe_cast(values: numpy.ndarray) numpy.ndarray[source]

Convert the dates of the vector in the same unit as the time axis defined in this instance.

Parameters

values (numpy.ndarray) – Values to convert.

Returns

values converted.

Return type

numpy.ndarray

Raises

UserWarning – if the implicit conversion from the unit of dates provided to the unit of the axis, truncates the dates (e.g. converting microseconds to seconds).