def test_var_trend():
    # see 2271
    data = get_macrodata().view((float,3), type=np.ndarray)

    model = sm.tsa.VAR(data)
    results = model.fit(4) #, trend = 'c')
    irf = results.irf(10)


    data_nc = data - data.mean(0)
    model_nc = sm.tsa.VAR(data_nc)
    results_nc = model_nc.fit(4, trend = 'nc')
    assert_raises(ValueError, model.fit, 4, trend='t')
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/tsa/vector_ar/tests/test_var.py/test_var_trend/original