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

Function test_optimize_None

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

Source from the content-addressed store, hash-verified

854
855
856def test_optimize_None():
857 pytest.importorskip("numpy")
858 da = pytest.importorskip("dask.array")
859
860 x = da.ones(10, chunks=(5,))
861 y = x[:9][1:8][::2] + 1 # normally these slices would be fused
862
863 def my_get(dsk, keys):
864 # but they aren't. +1 for the finalize task
865 assert len(dsk.__dask_graph__()) == len(y.dask) + 1
866 return dask.get(dsk, keys)
867
868 with dask.config.set(array_optimize=None, scheduler=my_get):
869 y.compute()
870
871
872def test_scheduler_keyword():

Callers

nothing calls this directly

Calls 3

setMethod · 0.80
onesMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected