MCPcopy Index your code
hub / github.com/pydata/xarray / get_date_field

Function get_date_field

xarray/coding/cftimeindex.py:125–127  ·  view source on GitHub ↗

Adapted from pandas.tslib.get_date_field

(datetimes, field)

Source from the content-addressed store, hash-verified

123
124
125def get_date_field(datetimes, field):
126 """Adapted from pandas.tslib.get_date_field"""
127 return np.array([getattr(date, field) for date in datetimes], dtype=np.int64)
128
129
130def _field_accessor(name, docstring=None, min_cftime_version="0.0"):

Callers 1

fFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…