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

Function test_multiple_grouper_empty_groups

xarray/tests/test_groupby.py:3320–3327  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3318
3319
3320def test_multiple_grouper_empty_groups() -> None:
3321 ds = xr.Dataset(
3322 {"foo": (("x", "y"), np.random.rand(4, 3))},
3323 coords={"x": [10, 20, 30, 40], "letters": ("x", list("abba"))},
3324 )
3325
3326 groups = ds.groupby(x=BinGrouper(bins=[5, 15, 25]), letters=UniqueGrouper())
3327 assert len(groups.groups) == 2
3328
3329
3330def test_groupby_multiple_bin_grouper_missing_groups() -> None:

Callers

nothing calls this directly

Calls 3

groupbyMethod · 0.95
BinGrouperClass · 0.90
UniqueGrouperClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…