[Scipy-svn] r6733 - in trunk/scipy/sparse: linalg/eigen/arpack/tests tests

scipy-svn@scip... scipy-svn@scip...
Sat Sep 11 19:53:57 CDT 2010


Author: ptvirtan
Date: 2010-09-11 19:53:57 -0500 (Sat, 11 Sep 2010)
New Revision: 6733

Modified:
   trunk/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py
   trunk/scipy/sparse/tests/test_spfuncs.py
Log:
3K: sparse: fix integer division in tests

Modified: trunk/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py
===================================================================
--- trunk/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py	2010-09-12 00:53:38 UTC (rev 6732)
+++ trunk/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py	2010-09-12 00:53:57 UTC (rev 6733)
@@ -84,8 +84,8 @@
             return eval[:k]
         if which=='BE':
             # one ev from each end - if k is odd, extra ev on high end
-            l=k/2
-            h=k/2+k%2
+            l=k//2
+            h=k//2+k%2
             low=range(len(eval))[:l]
             high=range(len(eval))[-h:]
             return eval[low+high]

Modified: trunk/scipy/sparse/tests/test_spfuncs.py
===================================================================
--- trunk/scipy/sparse/tests/test_spfuncs.py	2010-09-12 00:53:38 UTC (rev 6732)
+++ trunk/scipy/sparse/tests/test_spfuncs.py	2010-09-12 00:53:57 UTC (rev 6733)
@@ -73,7 +73,7 @@
         def gold(A,bs):
             R,C = bs
             I,J = A.nonzero()
-            return len( set( zip(I/R,J/C) ) )
+            return len( set( zip(I//R,J//C) ) )
 
         mats = []
         mats.append( [[0]] )



More information about the Scipy-svn mailing list