()
| 589 | |
| 590 | |
| 591 | def 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]) |