Esempio n. 1
0
def test__future_to_dask_array(c, s, a, b):
    import dask.array as da
    f = c.submit(np.ones, (5, 5))
    a = yield _future_to_dask_array(f)

    assert a.shape == (5, 5)
    assert a.dtype == np.ones(1).dtype
    assert isinstance(a, da.Array)

    aa = yield c.compute(a)._result()
    assert (aa == 1).all()
def test__future_to_dask_array(e, s, a, b):
    import dask.array as da
    f = e.submit(np.ones, (5, 5))
    a = yield _future_to_dask_array(f)

    assert a.shape == (5, 5)
    assert a.dtype == np.ones(1).dtype
    assert isinstance(a, da.Array)

    aa = yield e.compute(a)._result()
    assert (aa == 1).all()