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

Function test_map_blocks

xarray/tests/test_dask.py:1224–1233  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

1222
1223@pytest.mark.parametrize("obj", [make_da(), make_ds()])
1224def test_map_blocks(obj):
1225 def func(obj):
1226 result = obj + obj.x + 5 * obj.y
1227 return result
1228
1229 with raise_if_dask_computes():
1230 actual = xr.map_blocks(func, obj)
1231 expected = func(obj)
1232 assert_chunks_equal(expected.chunk(), actual)
1233 assert_identical(actual, expected)
1234
1235
1236@pytest.mark.parametrize("obj", [make_da(), make_ds()])

Callers

nothing calls this directly

Calls 6

raise_if_dask_computesFunction · 0.90
assert_chunks_equalFunction · 0.90
assert_identicalFunction · 0.90
funcFunction · 0.70
map_blocksMethod · 0.45
chunkMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…