[Scipy-svn] r5194 - trunk/scipy/spatial/tests

scipy-svn@scip... scipy-svn@scip...
Tue Nov 25 18:35:24 CST 2008


Author: peridot
Date: 2008-11-25 18:35:21 -0600 (Tue, 25 Nov 2008)
New Revision: 5194

Modified:
   trunk/scipy/spatial/tests/test_kdtree.py
Log:
Fix test failure due to roundoff error.


Modified: trunk/scipy/spatial/tests/test_kdtree.py
===================================================================
--- trunk/scipy/spatial/tests/test_kdtree.py	2008-11-25 17:21:38 UTC (rev 5193)
+++ trunk/scipy/spatial/tests/test_kdtree.py	2008-11-26 00:35:21 UTC (rev 5194)
@@ -413,7 +413,7 @@
     assert_equal(ds.shape, (m,n))
     for i in range(m):
         for j in range(n):
-            assert_equal(distance(xs[i],ys[j]),ds[i,j])
+            assert_almost_equal(distance(xs[i],ys[j]),ds[i,j])
 def test_distance_matrix_looping():
     m = 10
     n = 11



More information about the Scipy-svn mailing list