summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2019-05-10 15:23:28 +0100
committerEdoardo Pasca <edo.paskino@gmail.com>2019-05-10 15:23:28 +0100
commitc43ec42bb8a140ca4de7b43e9967263fb23099bd (patch)
tree337932d6abb1c950cf1586d8a7a2678117937fa5
parent170d1c659b35ba36eb734511470ead444502fe20 (diff)
downloadframework-c43ec42bb8a140ca4de7b43e9967263fb23099bd.tar.gz
framework-c43ec42bb8a140ca4de7b43e9967263fb23099bd.tar.bz2
framework-c43ec42bb8a140ca4de7b43e9967263fb23099bd.tar.xz
framework-c43ec42bb8a140ca4de7b43e9967263fb23099bd.zip
adjusted decimal
-rwxr-xr-xWrappers/Python/test/test_Gradient.py4
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)