()
| 292 | |
| 293 | @requires_dask |
| 294 | def test_dask_da_groupby_quantile() -> None: |
| 295 | # Scalar quantile |
| 296 | expected = xr.DataArray( |
| 297 | data=[2, 5], coords={"x": [1, 2], "quantile": 0.5}, dims="x" |
| 298 | ) |
| 299 | array = xr.DataArray( |
| 300 | data=[1, 2, 3, 4, 5, 6], coords={"x": [1, 1, 1, 2, 2, 2]}, dims="x" |
| 301 | ) |
| 302 | |
| 303 | # will work blockwise with flox |
| 304 | actual = array.chunk(x=3).groupby("x").quantile(0.5) |
| 305 | assert_identical(expected, actual) |
| 306 | |
| 307 | # will work blockwise with flox |
| 308 | actual = array.chunk(x=-1).groupby("x").quantile(0.5) |
| 309 | assert_identical(expected, actual) |
| 310 | |
| 311 | |
| 312 | @requires_dask |
nothing calls this directly
no test coverage detected
searching dependent graphs…