Hello Team Nixtla, I'm trying to fit several kind...
# general
c
Hello Team Nixtla, I'm trying to fit several kinds of ARIMA's inside a for loop. The snippet is below:
Copy code
from statsforecast.utils import AirPassengers as ap
from statsforecast.models import ARIMA
import numpy as np
# ARIMA
arima_p = np.arange(3)
arima_d = np.arange(3)
arima_q = np.arange(3)
for p in arima_p:
    for d in arima_d:
        for q in arima_q:
            if (p + d + q) > 0:
                arima = ARIMA(order = (p, d, q), season_length = 12)
                arima.fit(y=ap)
k
This is probably because there is a check for
isinstance(int)
but these are
nump.int64.
You can fix this by casting d, q, and p to int.
arima_p = [int(x) for x in np.arange(3)]
💯 1
c
That's right, thank you!