MCPcopy Create free account
hub / github.com/dask/dask / test_map_blocks_chunks

Function test_map_blocks_chunks

dask/array/tests/test_array_core.py:5747–5757  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5745
5746
5747def test_map_blocks_chunks():
5748 x = da.arange(400, chunks=(100,))
5749 y = da.arange(40, chunks=(10,))
5750
5751 def func(a, b):
5752 return np.array([a.max(), b.max()])
5753
5754 assert_eq(
5755 da.map_blocks(func, x, y, chunks=(2,), dtype=x.dtype),
5756 np.array([99, 9, 199, 19, 299, 29, 399, 39]),
5757 )
5758
5759
5760def test_nbytes_auto():

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
arangeMethod · 0.45
map_blocksMethod · 0.45

Tested by

no test coverage detected