From: Debian Science Maintainers Date: Sun, 24 Jul 2022 16:51:07 +0000 (+0100) Subject: test_seasonal_order fails on i386 X-Git-Tag: archive/raspbian/0.13.2+dfsg-4+rpi1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fabcbb7d695e14684558dd1bc0c0511c4ea92c9c;p=statsmodels.git test_seasonal_order fails on i386 Warn on use and xfail Author: Rebecca N. Palmer Forwarded: no Gbp-Pq: Name xfail_i386_ets.patch --- diff --git a/statsmodels/tsa/exponential_smoothing/ets.py b/statsmodels/tsa/exponential_smoothing/ets.py index c812590..d067b85 100644 --- a/statsmodels/tsa/exponential_smoothing/ets.py +++ b/statsmodels/tsa/exponential_smoothing/ets.py @@ -171,6 +171,11 @@ from statsmodels.tsa.exponential_smoothing.initialization import ( ) from statsmodels.tsa.tsatools import freq_to_period +import warnings +import sys +warn_ets = "ETSModel can give wrong results on 32 bit i386 and possibly other 32 bit systems" if sys.maxsize<2**33 else False + + # Implementation details: # * The smoothing equations are implemented only for models having all @@ -426,6 +431,8 @@ class ETSModel(base.StateSpaceMLEModel): missing="none", ): + if warn_ets: + warnings.warn(warn_ets) super().__init__( endog, exog=None, dates=dates, freq=freq, missing=missing ) diff --git a/statsmodels/tsa/tests/test_exponential_smoothing.py b/statsmodels/tsa/tests/test_exponential_smoothing.py index f1161a8..58985a5 100644 --- a/statsmodels/tsa/tests/test_exponential_smoothing.py +++ b/statsmodels/tsa/tests/test_exponential_smoothing.py @@ -13,7 +13,7 @@ import pandas as pd import pytest import scipy.stats -from statsmodels.tsa.exponential_smoothing.ets import ETSModel +from statsmodels.tsa.exponential_smoothing.ets import ETSModel,warn_ets import statsmodels.tsa.holtwinters as holtwinters import statsmodels.tsa.statespace.exponential_smoothing as statespace @@ -1051,6 +1051,7 @@ def test_estimated_initialization_short_data(oildata, trend, seasonal, nobs): @pytest.mark.parametrize("method", ["estimated", "heuristic"]) +@pytest.mark.xfail(condition=bool(warn_ets),reason='known to fail on i386',strict=False) def test_seasonal_order(reset_randomstate, method): seasonal = np.arange(12.0) time_series = np.array(list(seasonal) * 100)