[Scipy-svn] r4676 - trunk/scipy/cluster/tests

scipy-svn@scip... scipy-svn@scip...
Mon Aug 25 11:51:37 CDT 2008


Author: damian.eads
Date: 2008-08-25 11:51:35 -0500 (Mon, 25 Aug 2008)
New Revision: 4676

Modified:
   trunk/scipy/cluster/tests/test_distance.py
Log:
Fixed typo in Canberra test.

Modified: trunk/scipy/cluster/tests/test_distance.py
===================================================================
--- trunk/scipy/cluster/tests/test_distance.py	2008-08-25 12:33:58 UTC (rev 4675)
+++ trunk/scipy/cluster/tests/test_distance.py	2008-08-25 16:51:35 UTC (rev 4676)
@@ -956,11 +956,11 @@
 
     def test_pdist_canberra_ticket_711(self):
         "Tests pdist(X, 'canberra') to see if Canberra gives the right result as reported in Scipy bug report 711."
-        eps = 1e-10
+        eps = 1e-8
         pdist_y = pdist(([3.3], [3.4]), "canberra")
-        right_y = array([ 0.01492537])
+        right_y = 0.01492537
         print np.abs(pdist_y-right_y).max()
-        self.failUnless(within_tol(y1, y2, eps))
+        self.failUnless(within_tol(pdist_y, right_y, eps))
 
 def within_tol(a, b, tol):
     return np.abs(a - b).max() < tol



More information about the Scipy-svn mailing list