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

Function test_to_delayed

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

Source from the content-addressed store, hash-verified

3802
3803
3804def test_to_delayed():
3805 x = da.random.default_rng().random((4, 4), chunks=(2, 2))
3806 y = x + 10
3807
3808 [[a, b], [c, d]] = y.to_delayed()
3809 assert_eq(a.compute(), y[:2, :2])
3810
3811 s = 2
3812 x = da.from_array(np.array(s), chunks=0)
3813 a = x.to_delayed()[tuple()]
3814 assert a.compute() == s
3815
3816
3817def 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…