MCPcopy Index your code
hub / github.com/dask/dask / test_map_blocks_delayed

Function test_map_blocks_delayed

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

Source from the content-addressed store, hash-verified

4110
4111
4112def test_map_blocks_delayed():
4113 x = da.ones((10, 10), chunks=(5, 5))
4114 y = np.ones((5, 5))
4115
4116 z = x.map_blocks(add, y, dtype=x.dtype)
4117 z.dask.validate()
4118 dask.optimize(z)[0].dask.validate()
4119
4120 yy = delayed(y)
4121 zz = x.map_blocks(add, yy, dtype=x.dtype)
4122 zz.dask.validate()
4123 dask.optimize(zz)[0].dask.validate()
4124
4125 assert_eq(z, zz)
4126
4127 assert yy.key in zz.dask
4128
4129
4130def test_no_chunks():

Callers

nothing calls this directly

Calls 6

delayedFunction · 0.90
assert_eqFunction · 0.90
validateMethod · 0.80
onesMethod · 0.45
map_blocksMethod · 0.45
optimizeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…