(c)
| 236 | |
| 237 | |
| 238 | def 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 |
nothing calls this directly
no test coverage detected