1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Thu, 22 Dec 2022 13:43:09 +0000
Subject: Fix floating point comparison
---
ltfatpy/tests/gabor/test_gabphasegrad.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ltfatpy/tests/gabor/test_gabphasegrad.py b/ltfatpy/tests/gabor/test_gabphasegrad.py
index 5c585bb..dc6eb19 100644
--- a/ltfatpy/tests/gabor/test_gabphasegrad.py
+++ b/ltfatpy/tests/gabor/test_gabphasegrad.py
@@ -161,8 +161,8 @@ class TestGabphasegrad(unittest.TestCase):
g = str(g)
tgrad, fgrad = gabphasegrad(method, s, g, a, **kwargs)
msg = 'wrong output in gabphasegrad with inputs ' + str(inputs)
- assert_array_equal(tgrad, outputs[0], msg)
- assert_array_equal(fgrad, outputs[1], msg)
+ assert_allclose(tgrad, outputs[0], err_msg=msg)
+ assert_allclose(fgrad, outputs[1], err_msg=msg)
if __name__ == '__main__':
|