MCPcopy Create free account
hub / github.com/dask/dask / test_general_reduction_names

Function test_general_reduction_names

dask/array/tests/test_reductions.py:631–638  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

629
630
631def test_general_reduction_names():
632 dtype = int
633 a = da.reduction(
634 da.ones(10, dtype, chunks=2), np.sum, np.sum, dtype=dtype, name="foo"
635 )
636 names, tokens = list(zip_longest(*[key[0].rsplit("-", 1) for key in a.dask]))
637 assert set(names) == {"ones_like", "foo", "foo-partial", "foo-aggregate"}
638 assert all(tokens)
639
640
641@pytest.mark.parametrize("func", [np.sum, np.argmax])

Callers

nothing calls this directly

Calls 5

setClass · 0.85
allFunction · 0.85
rsplitMethod · 0.80
reductionMethod · 0.45
onesMethod · 0.45

Tested by

no test coverage detected