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

Function _contains_datetime_like_objects

xarray/core/common.py:2098–2102  ·  view source on GitHub ↗

Check if a variable contains datetime like objects (either np.datetime64, np.timedelta64, or cftime.datetime)

(var: T_Variable)

Source from the content-addressed store, hash-verified

2096
2097
2098def _contains_datetime_like_objects(var: T_Variable) -> bool:
2099 """Check if a variable contains datetime like objects (either
2100 np.datetime64, np.timedelta64, or cftime.datetime)
2101 """
2102 return is_np_datetime_like(var.dtype) or contains_cftime_datetimes(var)
2103
2104
2105def _is_numeric_aggregatable_dtype(var: T_Variable) -> bool:

Callers 15

decode_cf_variableFunction · 0.90
compute_chunksMethod · 0.90
factorizeMethod · 0.90
factorizeMethod · 0.90
compute_chunksMethod · 0.90
convert_calendarFunction · 0.90
interp_calendarFunction · 0.90
infer_freqFunction · 0.90
date_range_likeFunction · 0.90
differentiateMethod · 0.90
_integrate_oneMethod · 0.90

Calls 2

is_np_datetime_likeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…