MCPcopy
hub / github.com/dask/dask / test_fuse_roots

Function test_fuse_roots

dask/array/tests/test_optimization.py:221–228  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

219
220
221def test_fuse_roots():
222 x = da.ones(10, chunks=(2,))
223 y = da.zeros(10, chunks=(2,))
224 z = (x + 1) + (2 * y**2)
225 (zz,) = dask.optimize(z)
226 # assert len(zz.dask) == 5
227 assert sum(map(dask.istask, zz.dask.values())) == 5 # there are some aliases
228 assert_eq(zz, z)
229
230
231def test_fuse_roots_annotations():

Callers

nothing calls this directly

Calls 6

assert_eqFunction · 0.90
sumFunction · 0.50
onesMethod · 0.45
zerosMethod · 0.45
optimizeMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…