Beispiel #1
0
def _plan(old_chunks, new_chunks, itemsize=1, block_size_limit=1e7, threshold=4):
    return plan_rechunk(
        old_chunks,
        new_chunks,
        itemsize=itemsize,
        block_size_limit=block_size_limit,
        threshold=threshold,
    )
Beispiel #2
0
def test_plan_rechunk_asymmetric():
    a = ((1, ) * 1000, (80000000, ))
    b = ((1000, ), (80000, ) * 1000)
    steps = plan_rechunk(a, b, itemsize=8)
    assert len(steps) > 1

    x = da.ones((1000, 80000000), chunks=(1, 80000000))
    y = x.rechunk((1000, x.shape[1] // 1000))
    assert len(y.dask) < 100000
Beispiel #3
0
def test_plan_rechunk_asymmetric():
    a = ((1,) * 1000, (80000000,))
    b = ((1000,), (80000,) * 1000)
    steps = plan_rechunk(a, b, itemsize=8)
    assert len(steps) > 1

    x = da.ones((1000, 80000000), chunks=(1, 80000000))
    y = x.rechunk((1000, x.shape[1] // 1000))
    assert len(y.dask) < 100000
Beispiel #4
0
def _plan(old_chunks, new_chunks, itemsize=1, block_size_limit=1e7):
    return plan_rechunk(old_chunks,
                        new_chunks,
                        itemsize=itemsize,
                        block_size_limit=block_size_limit)
Beispiel #5
0
def _plan(old_chunks, new_chunks, itemsize=1, block_size_limit=1e7):
    return plan_rechunk(old_chunks, new_chunks,
                        itemsize=itemsize,
                        block_size_limit=block_size_limit)