Bug#1079681: python-ltfatpy: tests fail with scipy 1.14

Drew Parsons dparsons at debian.org
Mon Aug 26 08:56:21 BST 2024


Source: python-ltfatpy
Version: 1.0.16-10
Severity: normal

python-ltfatpy is failing tests with scipy 1.14 (from experimental)


 94s _________________________ TestGabWin.test_str_entries __________________________
 94s 
 94s self = <ltfatpy.tests.gabor.test_gabwin.TestGabWin testMethod=test_str_entries>
 94s 
 94s     def test_str_entries(self):
 94s         a = random.randint(10, 40)
 94s         M = random.randint(10, 40)
 94s         L = M * random.randint(2, 5)
 94s     
 94s         # psech
 94s         mess = "a = {0:d}, M = {1:d}, L = {2:d}".format(a, M, L)
 94s         (g, info) = gabwin("psech", a, M, L)
 94s         mess += "\ng = " + str(g)
 94s         mess += "\ninfo = " + str(info)
 94s         self.assertFalse(info['gauss'], mess)
 94s         self.assertTrue(info['wasreal'], mess)
 94s         self.assertFalse(info['istight'], mess)
 94s         self.assertFalse(info['isdual'], mess)
 94s         self.assertFalse(info['wasrow'], mess)
 94s         self.assertFalse(info['isfir'], mess)
 94s         self.assertEqual(info["tfr"], a*M/L, mess)
 94s         self.assertEqual(info["gl"], len(g), mess)
 94s         gt = psech(L, a*M/L)[0]
 94s         mess += "\ngt = " + str(gt)
 94s         np.testing.assert_array_almost_equal(g, gt, 10, mess)
 94s         self.assertRaises(ValueError, gabwin, "sech", a, M)
 94s     
 94s         # dualgauss
 94s         mess = "a = {0:d}, M = {1:d}, L = {2:d}".format(a, M, L)
 94s         (g, info) = gabwin("dualgauss", a, M, L)
 94s         mess += "\ng = " + str(g)
 94s         mess += "\ninfo = " + str(info)
 94s         self.assertFalse(info['gauss'], mess)
 94s         self.assertTrue(info['wasreal'], mess)
 94s         self.assertFalse(info['istight'], mess)
 94s         self.assertTrue(info['isdual'], mess)
 94s         self.assertFalse(info['wasrow'], mess)
 94s         self.assertFalse(info['isfir'], mess)
 94s         self.assertEqual(info["tfr"], a*M/L, mess)
 94s         self.assertEqual(info["gl"], len(g), mess)
 94s         gt = gabdual(pgauss(L, a*M/L)[0], a, M)
 94s         mess += "\ngt = " + str(gt)
 94s >       np.testing.assert_array_almost_equal(g, gt, 10, mess)
 94s 
 94s /usr/lib/python3/dist-packages/ltfatpy/tests/gabor/test_gabwin.py:153: 
 94s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
 94s /usr/lib/python3.12/contextlib.py:81: in inner
 94s     return func(*args, **kwds)
 94s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
 94s 
 94s args = (<function assert_array_almost_equal.<locals>.compare at 0x7f93d85ce700>, array([ 2.43659318e-01,  2.49038983e-01,  2....366e-01,  5.41698845e+13,  4.79537976e-01,
 94s         3.50772907e-01,  2.97075482e-01,  2.65937405e-01,  2.49038983e-01]))
 94s kwds = {'err_msg': 'a = 12, M = 12, L = 48\ng = [ 2.43659318e-01  2.49038983e-01  2.65937405e-01  2.97075482e-01\n  3.5077290...937405e-01  2.49038983e-01]', 'header': 'Arrays are not almost equal to 10 decimals', 'precision': 10, 'verbose': True}
 94s 
 94s     @wraps(func)
 94s     def inner(*args, **kwds):
 94s         with self._recreate_cm():
 94s >           return func(*args, **kwds)
 94s E           AssertionError: 
 94s E           Arrays are not almost equal to 10 decimals
 94s E           a = 12, M = 12, L = 48
 94s E           g = [ 2.43659318e-01  2.49038983e-01  2.65937405e-01  2.97075482e-01
 94s E             3.50772907e-01  4.79537976e-01 -5.90944195e+13 -1.01177366e-01
 94s E            -1.70279355e-02 -5.34239599e-03 -4.53699162e-03 -6.48379891e-03
 94s E            -1.05688000e-02 -1.82052627e-02 -3.28108543e-02 -6.18712497e-02
 94s E            -1.23319589e-01 -2.84536095e-01  5.90944195e+13  1.68559563e-01
 94s E             4.32852175e-02  1.28857429e-02  4.10163962e-03  1.49125769e-03
 94s E             9.11739068e-04  1.49125769e-03  4.10163962e-03  1.28857429e-02
 94s E             4.32852175e-02  1.68559563e-01 -5.90944195e+13 -2.84536095e-01
 94s E            -1.23319589e-01 -6.18712497e-02 -3.28108543e-02 -1.82052627e-02
 94s E            -1.05688000e-02 -6.48379891e-03 -4.53699162e-03 -5.34239599e-03
 94s E            -1.70279355e-02 -1.01177366e-01  5.90944195e+13  4.79537976e-01
 94s E             3.50772907e-01  2.97075482e-01  2.65937405e-01  2.49038983e-01]
 94s E           info = {'gauss': False, 'wasrow': False, 'isfir': False, 'istight': False, 'isdual': True, 'tfr': 3.0, 'wasreal': True, 'gl': 48}
 94s E           gt = [ 2.43659318e-01  2.49038983e-01  2.65937405e-01  2.97075482e-01
 94s E             3.50772907e-01  4.79537976e-01 -5.41698845e+13 -1.01177366e-01
 94s E            -1.70279355e-02 -5.34239599e-03 -4.53699162e-03 -6.48379891e-03
 94s E            -1.05688000e-02 -1.82052627e-02 -3.28108543e-02 -6.18712497e-02
 94s E            -1.23319589e-01 -2.84536095e-01  5.41698845e+13  1.68559563e-01
 94s E             4.32852175e-02  1.28857429e-02  4.10163962e-03  1.49125769e-03
 94s E             9.11739068e-04  1.49125769e-03  4.10163962e-03  1.28857429e-02
 94s E             4.32852175e-02  1.68559563e-01 -5.41698845e+13 -2.84536095e-01
 94s E            -1.23319589e-01 -6.18712497e-02 -3.28108543e-02 -1.82052627e-02
 94s E            -1.05688000e-02 -6.48379891e-03 -4.53699162e-03 -5.34239599e-03
 94s E            -1.70279355e-02 -1.01177366e-01  5.41698845e+13  4.79537976e-01
 94s E             3.50772907e-01  2.97075482e-01  2.65937405e-01  2.49038983e-01]
 94s E           Mismatched elements: 4 / 48 (8.33%)
 94s E           Max absolute difference: 4.92453496e+12
 94s E           Max relative difference: 0.09090909
 94s E            x: array([ 2.4365931801e-01,  2.4903898304e-01,  2.6593740518e-01,
 94s E                   2.9707548182e-01,  3.5077290702e-01,  4.7953797648e-01,
 94s E                  -5.9094419481e+13, -1.0117736621e-01, -1.7027935469e-02,...
 94s E            y: array([ 2.4365931801e-01,  2.4903898304e-01,  2.6593740518e-01,
 94s E                   2.9707548182e-01,  3.5077290702e-01,  4.7953797648e-01,
 94s E                  -5.4169884525e+13, -1.0117736621e-01, -1.7027935469e-02,...
 94s 
 94s /usr/lib/python3.12/contextlib.py:81: AssertionError


test log at
https://ci.debian.net/packages/p/python-ltfatpy/unstable/amd64/50977951/



More information about the debian-science-maintainers mailing list