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

Function test_futures_to_delayed_array

dask/tests/test_distributed.py:238–250  ·  view source on GitHub ↗
(c)

Source from the content-addressed store, hash-verified

236
237
238def test_futures_to_delayed_array(c):
239 pytest.importorskip("numpy")
240 da = pytest.importorskip("dask.array")
241 from dask.array.utils import assert_eq
242
243 np = pytest.importorskip("numpy")
244 x = np.arange(5)
245
246 futures = c.scatter([x, x])
247 A = da.concatenate(
248 [da.from_delayed(f, shape=x.shape, dtype=x.dtype) for f in futures], axis=0
249 )
250 assert_eq(A.compute(), np.concatenate([x, x], axis=0))
251
252
253@ignore_sync_scheduler_warning

Callers

nothing calls this directly

Calls 4

assert_eqFunction · 0.90
from_delayedMethod · 0.80
arangeMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected