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

Function test_datetime_mean

xarray/tests/test_groupby.py:3755–3770  ·  view source on GitHub ↗
(chunk, use_cftime)

Source from the content-addressed store, hash-verified

3753 ],
3754)
3755def test_datetime_mean(chunk, use_cftime):
3756 ds = xr.Dataset(
3757 {
3758 "var1": (
3759 ("time",),
3760 xr.date_range(
3761 "2021-10-31", periods=10, freq="D", use_cftime=use_cftime
3762 ),
3763 ),
3764 "var2": (("x",), list(range(10))),
3765 }
3766 )
3767 if chunk:
3768 ds = ds.chunk()
3769 assert "var1" in ds.groupby("x").mean("time")
3770 assert "var1" in ds.mean("x")
3771
3772
3773def test_mean_with_mixed_types():

Callers

nothing calls this directly

Calls 3

chunkMethod · 0.95
groupbyMethod · 0.95
meanMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…