diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/linalg/linalg.py | 2 | ||||
-rw-r--r-- | numpy/linalg/tests/test_build.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index 3e36112b7..005738c1c 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -1046,7 +1046,7 @@ def eig(a): 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) diff --git a/numpy/linalg/tests/test_build.py b/numpy/linalg/tests/test_build.py index eabe361cf..bf1ff3a9f 100644 --- a/numpy/linalg/tests/test_build.py +++ b/numpy/linalg/tests/test_build.py @@ -6,6 +6,8 @@ import numpy as np 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 @@ class TestF77Mismatch(TestCase): 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 |