to_float

function of dascore.utils.time source

to_float(
    obj: int | float | str | numpy.datetime64 | pandas._libs.tslibs.timestamps.Timestamp | numpy.ndarray[int, float, str, datetime64, Timestamp, ndarray] ,
)-> ‘np.ndarray’

Convert various datetime/timedelta things to a float.

Time offsets represent seconds, and datetimes are seconds from 1970.