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

Function _to_pytimedelta

xarray/core/duck_array_ops.py:715–716  ·  view source on GitHub ↗
(array, unit="us")

Source from the content-addressed store, hash-verified

713
714
715def _to_pytimedelta(array, unit="us"):
716 return array.astype(f"timedelta64[{unit}]").astype(datetime.timedelta)
717
718
719def np_timedelta64_to_float(array, datetime_unit):

Callers 1

meanFunction · 0.85

Calls 1

astypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…