// pickle this for the __get/setattr__ coverage.
// since the only time this is tested is in parallel in auto.py,
// this doesn"t actually get any coverage proof...
fl = "some_temp_file.pkl"
with open(fl, "wb") as p:
pickle.dump(arima, p)
// show we can predict with this even though it"s been pickled
new_xreg = rs.rand(5, 4)
_preds = arima.predict(n_periods=5, exogenous=new_xreg)
// now unpickle
with open(fl, "rb") as p:
other = pickle.load(p)
// show we can still predict, compare
_other_preds = other.predict(n_periods=5, exogenous=new_xreg)
assert_array_almost_equal(_preds, _other_preds)
// now remove the pickle file
os.unlink(fl)
// now show that since we fit the ARIMA with an exogenous array,
// we need to provide one for predictions otherwise it breaks.
with pytest.raises(ValueError):