From: Debian Science Maintainers Date: Tue, 28 Jan 2020 22:29:29 +0000 (+0000) Subject: Loosen tolerances on some tests on i386 X-Git-Tag: archive/raspbian/0.11.1-2+rpi1~2^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=29508f65aeadadc65bdf96185ec3a5499ad6c4b6;p=statsmodels.git Loosen tolerances on some tests on i386 Failure log https://buildd.debian.org/status/fetch.php?pkg=statsmodels&arch=i386&ver=0.9.0-3&stamp=1567157609&raw=0 As it only fails on i386 (not x32) and isn't far over tolerance, I suspect different rounding due to x87 excess precision Author: Rebecca N. Palmer Bug-Debian: https://bugs.debian.org/938949 Forwarded: no Gbp-Pq: Name i386_loosen_test_tolerances.patch --- diff --git a/statsmodels/tsa/statespace/tests/test_smoothing.py b/statsmodels/tsa/statespace/tests/test_smoothing.py index d13a6b1..00db5ed 100644 --- a/statsmodels/tsa/statespace/tests/test_smoothing.py +++ b/statsmodels/tsa/statespace/tests/test_smoothing.py @@ -27,8 +27,9 @@ from statsmodels.tsa.statespace.kalman_smoother import ( SMOOTH_UNIVARIATE) current_path = os.path.dirname(os.path.abspath(__file__)) - - +import sys +import glob +i386_looser_tolerances=len(glob.glob('/usr/lib/i386-*/'))>0 and np.log2(sys.maxsize)<=32 class TestStatesAR3(object): @classmethod def setup_class(cls, alternate_timing=False, *args, **kwargs): @@ -832,7 +833,7 @@ class TestMultivariateVARUnivariate(object): def test_forecasts_error_cov(self): assert_allclose( self.results.forecasts_error_cov.diagonal(), - self.desired[['F1', 'F2', 'F3']] + self.desired[['F1', 'F2', 'F3']],rtol=2e-7 if i386_looser_tolerances else 1e-7 ) def test_predicted_states(self): @@ -886,7 +887,7 @@ class TestMultivariateVARUnivariate(object): def test_smoothed_measurement_disturbance_cov(self): assert_allclose( self.results.smoothed_measurement_disturbance_cov.diagonal(), - self.desired[['Veps1', 'Veps2', 'Veps3']] + self.desired[['Veps1', 'Veps2', 'Veps3']],rtol=2e-7 if i386_looser_tolerances else 1e-7 )