def predict(model, x):
    assert x.ndim == 2
    if len(x.chunks[1]) > 1:
        x = x.reblock(chunks=(x.chunks[0], sum(x.chunks[1])))
    func = partial(_predict, model)
    return x.map_blocks(func, chunks=(x.chunks[0], (1,))).squeeze()
Predict with a scikit learn model
dataset/ETHPy150Open dask/dask/dask/array/learn.py/predict