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

Function is_np_datetime_like

xarray/core/common.py:2068–2070  ·  view source on GitHub ↗

Check if a dtype is a subclass of the numpy datetime types

(dtype: DTypeLike | None)

Source from the content-addressed store, hash-verified

2066
2067
2068def is_np_datetime_like(dtype: DTypeLike | None) -> bool:
2069 """Check if a dtype is a subclass of the numpy datetime types"""
2070 return np.issubdtype(dtype, np.datetime64) or np.issubdtype(dtype, np.timedelta64)
2071
2072
2073def is_np_timedelta_like(dtype: DTypeLike | None) -> bool:

Callers 11

convert_calendarFunction · 0.90
infer_calendar_nameFunction · 0.90
convert_timesFunction · 0.90
date_range_likeFunction · 0.90
_get_date_fieldFunction · 0.90
_round_fieldFunction · 0.90
_strftimeFunction · 0.90
isocalendarMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…