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

Function test_origin

xarray/tests/test_cftimeindex_resample.py:260–277  ·  view source on GitHub ↗
(closed, origin)

Source from the content-addressed store, hash-verified

258 ids=lambda x: f"{x}",
259)
260def test_origin(closed, origin) -> None:
261 initial_freq, resample_freq = ("3h", "9h")
262 start = "1969-12-31T12:07:01"
263 index_kwargs: DateRangeKwargs = dict(
264 start=start, periods=12, freq=initial_freq, unit="ns"
265 )
266 datetime_index = pd.date_range(**index_kwargs)
267 cftime_index = xr.date_range(**index_kwargs, use_cftime=True)
268 da_datetimeindex = da(datetime_index)
269 da_cftimeindex = da(cftime_index)
270
271 compare_against_pandas(
272 da_datetimeindex,
273 da_cftimeindex,
274 resample_freq,
275 closed=closed,
276 origin=origin,
277 )
278
279
280@pytest.mark.parametrize("offset", ["foo", "5MS", 10])

Callers

nothing calls this directly

Calls 2

compare_against_pandasFunction · 0.85
daFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…