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

Function test_to_delayed

dask/array/tests/test_array_core.py:3794–3804  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3792
3793
3794def test_to_delayed():
3795 x = da.random.default_rng().random((4, 4), chunks=(2, 2))
3796 y = x + 10
3797
3798 [[a, b], [c, d]] = y.to_delayed()
3799 assert_eq(a.compute(), y[:2, :2])
3800
3801 s = 2
3802 x = da.from_array(np.array(s), chunks=0)
3803 a = x.to_delayed()[tuple()]
3804 assert a.compute() == s
3805
3806
3807def test_to_delayed_optimize_graph():

Callers

nothing calls this directly

Calls 4

assert_eqFunction · 0.90
randomMethod · 0.45
to_delayedMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected