()
| 629 | |
| 630 | |
| 631 | def 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]) |