'Tests fitting multiple models simultaneously.'

def test_linear_fit_model_set(self):

    init_model = models.Polynomial1D(degree=2, c0=[1, 1], n_models=2)
    x = np.arange(10)
    y_expected = init_model(x, model_set_axis=False)
    assert (y_expected.shape == (2, 10))
    with NumpyRNGContext(_RANDOM_SEED):
        y = (y_expected + np.random.normal(0, 0.01, size=y_expected.shape))
    fitter = LinearLSQFitter()
    fitted_model = fitter(init_model, x, y)
    assert_allclose(fitted_model(x, model_set_axis=False), y_expected, rtol=0.1)
