Fix compatibility with numpy 1.22
authorAntonio Valentino <antonio.valentino@tiscali.it>
Tue, 20 Dec 2022 21:09:47 +0000 (21:09 +0000)
committerAntonio Valentino <antonio.valentino@tiscali.it>
Tue, 20 Dec 2022 21:15:54 +0000 (21:15 +0000)
See also https://github.com/PyTables/PyTables/issues/934.

Forwarded: not-needed
Applied-Upstream: https://github.com/PyTables/PyTables/commit/f3bfb0cc2508cd25e29408e25c8a06b211dd27e7

Gbp-Pq: Name 0005-Fix-compatibility-with-numpy-1.22.patch

tables/tests/test_expression.py

index 502ae42b74a1c6e35d7d3f70f103bf82451ccadd..018d4208c11b5e51b10133fa656be3d1da273ba3 100644 (file)
@@ -2,6 +2,7 @@
 
 
 import numpy as np
+from numpy import testing as npt
 
 import tables as tb
 from tables.tests import common
@@ -895,8 +896,7 @@ class FunctionsTestCase(common.TempFileMixin, common.PyTablesTestCase):
         if common.verbose:
             print("Computed expression:", repr(r1), r1.dtype)
             print("Should look like:", repr(r2), r2.dtype)
-        self.assertTrue(common.areArraysEqual(r1, r2),
-                        "Evaluate is returning a wrong value.")
+        npt.assert_array_almost_equal_nulp(r1, r2)
 
 
 # Test for EArrays with maindim != 0