diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-08-05 07:48:48 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-08-05 07:48:48 +0000 |
commit | 3457ac34f84f502de194ad825c0db4cb0d56dc82 (patch) | |
tree | 3b76d6ccfb0d3cbeddff00e7c7d359d5fa541d1e /numpy/linalg/linalg.py | |
parent | 0820b2a2c8cebe828c1a9faa1bef45a8b0421100 (diff) | |
download | numpy-3457ac34f84f502de194ad825c0db4cb0d56dc82.tar.gz |
Fix uses of nonzero and add flatnonzero
Diffstat (limited to 'numpy/linalg/linalg.py')
-rw-r--r-- | numpy/linalg/linalg.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index d1de7fea2..d80d36685 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -313,7 +313,7 @@ eigenvalue u[i]. Satisfies the equation dot(a, v[:,i]) = u[i]*v[:,i] else: w = wr+1j*wi v = array(vr, w.dtype) - ind = nonzero(wi != 0.0) # indices of complex e-vals + ind = nonzero(wi != 0.0)[0] # indices of complex e-vals 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]] |