diff options
author | Edoardo Pasca <edo.paskino@gmail.com> | 2019-05-10 15:23:28 +0100 |
---|---|---|
committer | Edoardo Pasca <edo.paskino@gmail.com> | 2019-05-10 15:23:28 +0100 |
commit | c43ec42bb8a140ca4de7b43e9967263fb23099bd (patch) | |
tree | 337932d6abb1c950cf1586d8a7a2678117937fa5 | |
parent | 170d1c659b35ba36eb734511470ead444502fe20 (diff) | |
download | framework-c43ec42bb8a140ca4de7b43e9967263fb23099bd.tar.gz framework-c43ec42bb8a140ca4de7b43e9967263fb23099bd.tar.bz2 framework-c43ec42bb8a140ca4de7b43e9967263fb23099bd.tar.xz framework-c43ec42bb8a140ca4de7b43e9967263fb23099bd.zip |
adjusted decimal
-rwxr-xr-x | Wrappers/Python/test/test_Gradient.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Wrappers/Python/test/test_Gradient.py b/Wrappers/Python/test/test_Gradient.py index 89f26eb..6d9d3be 100755 --- a/Wrappers/Python/test/test_Gradient.py +++ b/Wrappers/Python/test/test_Gradient.py @@ -93,9 +93,9 @@ class TestGradient(unittest.TestCase): G = Gradient(ig) norm1 = G.norm(iterations=300) print ("should be sqrt(8) {} {}".format(numpy.sqrt(8), norm1)) - numpy.testing.assert_almost_equal(norm1, numpy.sqrt(8), decimal=2) + numpy.testing.assert_almost_equal(norm1, numpy.sqrt(8), decimal=1) ig4 = ImageGeometry(M,N, channels=3) G4 = Gradient(ig4, correlation=Gradient.CORRELATION_SPACECHANNEL) norm4 = G4.norm(iterations=300) print ("should be sqrt(12) {} {}".format(numpy.sqrt(12), norm4)) - numpy.testing.assert_almost_equal(norm4, numpy.sqrt(12), decimal=2) + numpy.testing.assert_almost_equal(norm4, numpy.sqrt(12), decimal=1) |