fridom.framework.utils.numpy_utils.to_seconds

Contents

fridom.framework.utils.numpy_utils.to_seconds#

fridom.framework.utils.numpy_utils.to_seconds(t: float | datetime64 | timedelta64) float[source]#

Convert a time to seconds.

Description#

This function converts a time to seconds. The time can be given as a float, a np.datetime64 or a np.timedelta64.

Parameters#

tUnion[float, np.datetime64, np.timedelta64]

The time to convert to seconds.

Returns#

float

The time in seconds.