MCPcopy
hub / github.com/pydata/xarray / test_apply_dask_parallelized_two_outputs

Function test_apply_dask_parallelized_two_outputs

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

Source from the content-addressed store, hash-verified

421
422@requires_dask
423def test_apply_dask_parallelized_two_outputs() -> None:
424 data_array = xr.DataArray([[0, 1, 2], [1, 2, 3]], dims=("x", "y"))
425
426 def twice(obj):
427 def func(x):
428 return (x, x)
429
430 return apply_ufunc(func, obj, output_core_dims=[[], []], dask="parallelized")
431
432 out0, out1 = twice(data_array.chunk({"x": 1}))
433 assert_identical(data_array, out0)
434 assert_identical(data_array, out1)
435
436
437def test_apply_input_core_dimension() -> None:

Callers

nothing calls this directly

Calls 3

chunkMethod · 0.95
twiceFunction · 0.85
assert_identicalFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…