MCPcopy Index your code
hub / github.com/pydata/xarray / test_vectorize_dask

Function test_vectorize_dask

xarray/tests/test_computation.py:1417–1429  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1415
1416@requires_dask
1417def 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

Callers

nothing calls this directly

Calls 3

chunkMethod · 0.95
apply_ufuncFunction · 0.90
assert_identicalFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…