()
| 2812 | |
| 2813 | @requires_dask |
| 2814 | def test_groupby_math_auto_chunk() -> None: |
| 2815 | da = xr.DataArray( |
| 2816 | [[1, 2, 3], [1, 2, 3], [1, 2, 3]], |
| 2817 | dims=("y", "x"), |
| 2818 | coords={"label": ("x", [2, 2, 1])}, |
| 2819 | ) |
| 2820 | sub = xr.DataArray( |
| 2821 | InaccessibleArray(np.array([1, 2])), dims="label", coords={"label": [1, 2]} |
| 2822 | ) |
| 2823 | chunked = da.chunk(x=1, y=2) |
| 2824 | chunked.label.load() |
| 2825 | actual = chunked.groupby("label") - sub |
| 2826 | assert actual.chunksizes == {"x": (1, 1, 1), "y": (2, 1)} |
| 2827 | |
| 2828 | |
| 2829 | @pytest.mark.parametrize("use_flox", [True, False]) |
nothing calls this directly
no test coverage detected
searching dependent graphs…