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, )
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
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
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)