()
| 1415 | |
| 1416 | @requires_dask |
| 1417 | def test_vectorize_dask() -> None: |
| 1418 | # run vectorization in dask.array.gufunc by using `dask='parallelized'` |
| 1419 | data_array = xr.DataArray([[0, 1, 2], [1, 2, 3]], dims=("x", "y")) |
| 1420 | expected = xr.DataArray([1, 2], dims=["x"]) |
| 1421 | actual = apply_ufunc( |
| 1422 | pandas_median, |
| 1423 | data_array.chunk({"x": 1}), |
| 1424 | input_core_dims=[["y"]], |
| 1425 | vectorize=True, |
| 1426 | dask="parallelized", |
| 1427 | output_dtypes=[float], |
| 1428 | ) |
| 1429 | assert_identical(expected, actual) |
| 1430 | |
| 1431 | |
| 1432 | @requires_dask |
nothing calls this directly
no test coverage detected
searching dependent graphs…