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

Function test_vectorize_exclude_dims_dask

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

Source from the content-addressed store, hash-verified

1528
1529@requires_dask
1530def test_vectorize_exclude_dims_dask() -> None:
1531 # GH 3890
1532 data_array_a = xr.DataArray([[0, 1, 2], [1, 2, 3]], dims=("x", "y"))
1533 data_array_b = xr.DataArray([[0, 1, 2, 3, 4], [1, 2, 3, 4, 5]], dims=("x", "y"))
1534
1535 expected = xr.DataArray([3, 5], dims=["x"])
1536 actual = apply_ufunc(
1537 pandas_median_add,
1538 data_array_a.chunk({"x": 1}),
1539 data_array_b.chunk({"x": 1}),
1540 input_core_dims=[["y"], ["y"]],
1541 exclude_dims=set("y"),
1542 vectorize=True,
1543 dask="parallelized",
1544 output_dtypes=[float],
1545 )
1546 assert_identical(expected, actual)
1547
1548
1549def test_corr_only_dataarray() -> None:

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…