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

Function test_optimize

dask/tests/test_base.py:612–626  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

610
611
612def test_optimize():
613 x = dask.delayed(inc)(1)
614 y = dask.delayed(inc)(x)
615 z = x + y
616
617 x2, y2, z2, constant = optimize(x, y, z, 1)
618 assert constant == 1
619
620 # Same graphs for each
621 dsk = dict(x2.dask)
622 assert dict(y2.dask) == dsk
623 assert dict(z2.dask) == dsk
624
625 # Computationally equivalent
626 assert dask.compute(x2, y2, z2) == dask.compute(x, y, z)
627
628
629def test_optimize_nested():

Callers

nothing calls this directly

Calls 2

optimizeFunction · 0.90
computeMethod · 0.45

Tested by

no test coverage detected