diff --git a/Wrappers/Python/test/test_PluginsTigre.py b/Wrappers/Python/test/test_PluginsTigre.py index 331bcd6aa6..820ce61bc7 100644 --- a/Wrappers/Python/test/test_PluginsTigre.py +++ b/Wrappers/Python/test/test_PluginsTigre.py @@ -315,7 +315,7 @@ def compare_forward(self, direct_method, atol): fp2 = fp.copy() fp2.fill(0) Op.direct(self.img_data,out=fp2) - np.testing.assert_array_equal(fp.as_array(), fp2.as_array()) + np.testing.assert_allclose(fp.as_array(), fp2.as_array(),1e-8) @unittest.skipUnless(has_tigre, "TIGRE not installed") def test_backward(self): @@ -327,7 +327,7 @@ def test_backward(self): bp2 = bp.copy() bp2.fill(0) Op.adjoint(self.acq_data,out=bp2) - np.testing.assert_array_equal(bp.as_array(), bp2.as_array()) + np.testing.assert_allclose(bp.as_array(), bp2.as_array(), 1e-8) def compare_backward_FDK_matched(self): @@ -389,7 +389,7 @@ def compare_FBP(self,atol): reco2 = reco.copy() reco2.fill(0) fbp(self.acq_data,out=reco2) - np.testing.assert_array_equal(reco.as_array(), reco2.as_array()) + np.testing.assert_allclose(reco.as_array(), reco2.as_array(),atol=1e-8) def compare_norm(self,direct_method,norm): diff --git a/Wrappers/Python/test/test_reconstructors.py b/Wrappers/Python/test/test_reconstructors.py index cf4f31bfc1..0d0e898cb4 100644 --- a/Wrappers/Python/test/test_reconstructors.py +++ b/Wrappers/Python/test/test_reconstructors.py @@ -492,7 +492,7 @@ def test_results_3D(self): reco2 = reco.copy() reco2.fill(0) reconstructor.run(out=reco2, verbose=0) - np.testing.assert_array_equal(reco.as_array(), reco2.as_array()) + np.testing.assert_allclose(reco.as_array(), reco2.as_array(), atol=1e-8) @unittest.skipUnless(has_tigre and has_ipp, "TIGRE or IPP not installed") @@ -508,7 +508,7 @@ def test_results_2D(self): reco2 = reco.copy() reco2.fill(0) reconstructor.run(out=reco2, verbose=0) - np.testing.assert_array_equal(reco.as_array(), reco2.as_array()) + np.testing.assert_allclose(reco.as_array(), reco2.as_array(), atol=1e-8) @unittest.skipUnless(has_tigre and has_ipp, "TIGRE or IPP not installed") @@ -571,7 +571,7 @@ def test_results_3D(self): reco2 = reco.copy() reco2.fill(0) reconstructor.run(out=reco2, verbose=0) - np.testing.assert_array_equal(reco.as_array(), reco2.as_array()) + np.testing.assert_allclose(reco.as_array(), reco2.as_array(), atol=1e-8) @unittest.skipUnless(has_tigre and has_ipp, "TIGRE or IPP not installed") @@ -586,7 +586,7 @@ def test_results_3D_split(self): reco2 = reco.copy() reco2.fill(0) reconstructor.run(out=reco2, verbose=0) - np.testing.assert_array_equal(reco.as_array(), reco2.as_array()) + np.testing.assert_allclose(reco.as_array(), reco2.as_array(), atol=1e-8) @unittest.skipUnless(has_tigre and has_ipp, "TIGRE or IPP not installed") @@ -602,7 +602,7 @@ def test_results_2D(self): reco2 = reco.copy() reco2.fill(0) reconstructor.run(out=reco2, verbose=0) - np.testing.assert_array_equal(reco.as_array(), reco2.as_array()) + np.testing.assert_allclose(reco.as_array(), reco2.as_array(), atol=1e-8) @unittest.skipUnless(has_tigre and has_ipp, "TIGRE or IPP not installed") diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 7965948e7b..2576fe549f 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -59,7 +59,7 @@ requirements: run: - python - {{ pin_compatible('numpy', min_pin='x.x', max_pin='x.x') }} - - scipy + - scipy >=1.4.0 - matplotlib >=3.3.0 - h5py - pillow