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

Function _numpy_to_netcdf_timeunit

xarray/coding/times.py:153–162  ·  view source on GitHub ↗
(units: NPDatetimeUnitOptions)

Source from the content-addressed store, hash-verified

151
152
153def _numpy_to_netcdf_timeunit(units: NPDatetimeUnitOptions) -> str:
154 return {
155 "ns": "nanoseconds",
156 "us": "microseconds",
157 "ms": "milliseconds",
158 "s": "seconds",
159 "m": "minutes",
160 "h": "hours",
161 "D": "days",
162 }[units]
163
164
165def _numpy_dtype_to_netcdf_timeunit(dtype: np.dtype) -> str:

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…