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

Function test_general_reduction_names

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

Source from the content-addressed store, hash-verified

589
590
591def test_general_reduction_names():
592 dtype = int
593 a = da.reduction(
594 da.ones(10, dtype, chunks=2), np.sum, np.sum, dtype=dtype, name="foo"
595 )
596 names, tokens = list(zip_longest(*[key[0].rsplit("-", 1) for key in a.dask]))
597 assert set(names) == {"ones_like", "foo", "foo-partial", "foo-aggregate"}
598 assert all(tokens)
599
600
601@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