diff options
author | Pauli Virtanen <pav@iki.fi> | 2010-02-21 02:48:04 +0000 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2010-02-21 02:48:04 +0000 |
commit | 6c990fbdd58e969d179e3d721d85c9f0ea3a6005 (patch) | |
tree | 977566c6395e2a7cc5414164bd05355e2ec04115 | |
parent | fab2b47311a315942ae12fa56a7fef43f84d3c21 (diff) | |
download | numpy-6c990fbdd58e969d179e3d721d85c9f0ea3a6005.tar.gz |
3K: linalg: fix integer division issue and tests
-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 |