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

Function test_map_blocks_delayed

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

Source from the content-addressed store, hash-verified

4106
4107
4108def test_map_blocks_delayed():
4109 x = da.ones((10, 10), chunks=(5, 5))
4110 y = np.ones((5, 5))
4111
4112 z = x.map_blocks(add, y, dtype=x.dtype)
4113 z.dask.validate()
4114 dask.optimize(z)[0].dask.validate()
4115
4116 yy = delayed(y)
4117 zz = x.map_blocks(add, yy, dtype=x.dtype)
4118 zz.dask.validate()
4119 dask.optimize(zz)[0].dask.validate()
4120
4121 assert_eq(z, zz)
4122
4123 assert yy.key in zz.dask
4124
4125
4126def 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