'pm.auto_arima "zero-size array to reduction operation maximum which has no identity" only for some columns

The training split of my time series of weekly data has 105 data points, i.e. 2 years 1 week, and 7 variables. My goal is to fit a VAR. To determine the order of p and q I want to do an auto arima for each of the variables with the following code:

...
for name in train.columns:
    ...
    stepwise_model = auto_arima(train[name],start_p=1, start_q=1,max_p=10, max_q=10, seasonal=True, m=52,
        trace=True,error_action='ignore',suppress_warnings=True, stepwise=True,maxiter=1000)
...

The problem: For 5 variables, this works just fine. For 2 variables, this throws an error:

<__array_function__ internals> in ptp(*args, **kwargs)

/usr/local/lib/python3.7/dist-packages/numpy/core/_methods.py in _ptp(a, axis, out, keepdims)
    274 def _ptp(a, axis=None, out=None, keepdims=False):
    275     return um.subtract(
--> 276         umr_maximum(a, axis, None, out, keepdims),
    277         umr_minimum(a, axis, None, None, keepdims),
    278         out

ValueError: zero-size array to reduction operation maximum which has no identity

My questions:

  1. What does this error mean (couldn't find anything so far)?
  2. Why do I only get it for two out of my seven variables although each series has the same length?


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source