def fit(model, x, y, get=threaded.get, **kwargs):
    assert x.ndim == 2
    assert y.ndim == 1
    assert x.chunks[0] == y.chunks[0]
    assert hasattr(model, 'partial_fit')
    if len(x.chunks[1]) > 1:
        x = x.reblock(chunks=(x.chunks[0], sum(x.chunks[1])))

    nblocks = len(x.chunks[0])

    name = 'fit-' + tokenize(model, x, y, kwargs)
    dsk = {(name, -1): model}
    dsk.update(dict(((name, i), (_partial_fit, (name, i - 1),
                                          (x.name, i, 0),
                                          (y.name, i),
                                          kwargs))
                    for i in range(nblocks)))

    return get(merge(x.dask, y.dask, dsk), (name, nblocks - 1))
generate pseudorandom stochastic signals with covariance matrix covmat
dataset/ETHPy150Open dask/dask/dask/array/learn.py/fit--crossover with--dataset/ETHPy150Open scot-dev/scot/scot/tests/generate_testdata.py/generate_covsig