

def predict(model, x):
    ' Predict with a scikit learn model\n\n    Parameters\n    ----------\n\n    model: scikit learn classifier\n    x: dask Array\n\n    See docstring for ``da.learn.fit``\n    '
    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()

dataset/ETHPy150Open dask/dask/dask/array/learn.py predict/original