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

Function test_optimize

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

Source from the content-addressed store, hash-verified

621
622
623def test_optimize():
624 x = dask.delayed(inc)(1)
625 y = dask.delayed(inc)(x)
626 z = x + y
627
628 x2, y2, z2, constant = optimize(x, y, z, 1)
629 assert constant == 1
630
631 # Same graphs for each
632 dsk = dict(x2.dask)
633 assert dict(y2.dask) == dsk
634 assert dict(z2.dask) == dsk
635
636 # Computationally equivalent
637 assert dask.compute(x2, y2, z2) == dask.compute(x, y, z)
638
639
640def test_optimize_nested():

Callers

nothing calls this directly

Calls 2

optimizeFunction · 0.90
computeMethod · 0.45

Tested by

no test coverage detected