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:4105–4120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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