Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
715
def
_to_pytimedelta(array, unit=
"us"
):
716
return
array.astype(f
"timedelta64[{unit}]"
).astype(datetime.timedelta)
717
718
719
def
np_timedelta64_to_float(array, datetime_unit):
Callers
1
mean
Function · 0.85
Calls
1
astype
Method · 0.45
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…