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

Function test_ds_groupby_map_func_args

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

Source from the content-addressed store, hash-verified

274
275
276def test_ds_groupby_map_func_args() -> None:
277 def func(arg1, arg2, arg3=0):
278 return arg1 + arg2 + arg3
279
280 dataset = xr.Dataset({"foo": ("x", [1, 1, 1])}, {"x": [1, 2, 3]})
281 expected = xr.Dataset({"foo": ("x", [3, 3, 3])}, {"x": [1, 2, 3]})
282 actual = dataset.groupby("x").map(func, args=(1,), arg3=1)
283 assert_identical(expected, actual)
284
285
286def test_da_groupby_empty() -> None:

Callers

nothing calls this directly

Calls 3

groupbyMethod · 0.95
assert_identicalFunction · 0.90
mapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…