MCPcopy
hub / github.com/pydata/xarray / _timedelta_to_seconds

Function _timedelta_to_seconds

xarray/core/duck_array_ops.py:738–742  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

736
737
738def _timedelta_to_seconds(array):
739 if isinstance(array, datetime.timedelta):
740 return array.total_seconds() * 1e6
741 else:
742 return np.reshape([a.total_seconds() for a in array.ravel()], array.shape) * 1e6
743
744
745def py_timedelta_to_float(array, datetime_unit):

Callers 1

py_timedelta_to_floatFunction · 0.85

Calls 1

total_secondsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…