[Numpy-svn] r8205 - in trunk/numpy/linalg: . tests

numpy-svn at scipy.org numpy-svn at scipy.org
Sat Feb 20 21:48:05 EST 2010


Author: ptvirtan
Date: 2010-02-20 20:48:04 -0600 (Sat, 20 Feb 2010)
New Revision: 8205

Modified:
   trunk/numpy/linalg/linalg.py
   trunk/numpy/linalg/tests/test_build.py
Log:
3K: linalg: fix integer division issue and tests

Modified: trunk/numpy/linalg/linalg.py
===================================================================
--- trunk/numpy/linalg/linalg.py	2010-02-21 02:47:48 UTC (rev 8204)
+++ trunk/numpy/linalg/linalg.py	2010-02-21 02:48:04 UTC (rev 8205)
@@ -1046,7 +1046,7 @@
             w = wr+1j*wi
             v = array(vr, w.dtype)
             ind = flatnonzero(wi != 0.0)      # indices of complex e-vals
-            for i in range(len(ind)/2):
+            for i in range(len(ind)//2):
                 v[ind[2*i]] = vr[ind[2*i]] + 1j*vr[ind[2*i+1]]
                 v[ind[2*i+1]] = vr[ind[2*i]] - 1j*vr[ind[2*i+1]]
             result_t = _complexType(result_t)

Modified: trunk/numpy/linalg/tests/test_build.py
===================================================================
--- trunk/numpy/linalg/tests/test_build.py	2010-02-21 02:47:48 UTC (rev 8204)
+++ trunk/numpy/linalg/tests/test_build.py	2010-02-21 02:48:04 UTC (rev 8205)
@@ -6,6 +6,8 @@
 from numpy.linalg import lapack_lite
 from numpy.testing import TestCase, dec
 
+from numpy.compat import asbytes_nested
+
 class FindDependenciesLdd:
     def __init__(self):
         self.cmd = ['ldd']
@@ -41,7 +43,7 @@
     def test_lapack(self):
         f = FindDependenciesLdd()
         deps = f.grep_dependencies(lapack_lite.__file__,
-                                   ['libg2c', 'libgfortran'])
+                                   asbytes_nested(['libg2c', 'libgfortran']))
         self.failIf(len(deps) > 1,
 """Both g77 and gfortran runtimes linked in lapack_lite ! This is likely to
 cause random crashes and wrong results. See numpy INSTALL.txt for more




More information about the Numpy-svn mailing list