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

Function default_precision_timestamp

xarray/compat/pdcompat.py:90–98  ·  view source on GitHub ↗

Return a Timestamp object with the default precision. Xarray default is "ns".

(*args, **kwargs)

Source from the content-addressed store, hash-verified

88
89
90def default_precision_timestamp(*args, **kwargs) -> pd.Timestamp:
91 """Return a Timestamp object with the default precision.
92
93 Xarray default is "ns".
94 """
95 dt = pd.Timestamp(*args, **kwargs)
96 if dt.unit != "ns":
97 dt = timestamp_as_unit(dt, "ns")
98 return dt

Callers 1

date_range_likeFunction · 0.90

Calls 1

timestamp_as_unitFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…