diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-09-21 14:11:36 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-09-21 14:11:36 -0600 |
commit | e7689a2600a28e75d187bbad06d730fb7e66bc5f (patch) | |
tree | 8b5fd92efaf94f996ac92f947548c8d92f7ed7b2 | |
parent | 772c80b1ce1db7e30497fcf555ac9af56b0d7fce (diff) | |
parent | db457fb84ba54f9a2ffcdcda2af86fa4012e9237 (diff) | |
download | numpy-e7689a2600a28e75d187bbad06d730fb7e66bc5f.tar.gz |
Merge pull request #6321 from pizzathief/issue5904
DOC: linalg.eig will return an array of a real type if the
-rw-r--r-- | numpy/linalg/linalg.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index cf5b314ac..a2405c180 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -1012,9 +1012,10 @@ def eig(a): w : (..., M) array The eigenvalues, each repeated according to its multiplicity. The eigenvalues are not necessarily ordered. The resulting - array will be always be of complex type. When `a` is real - the resulting eigenvalues will be real (0 imaginary part) or - occur in conjugate pairs + array will be of complex type, unless the imaginary part is + zero in which case it will be cast to a real type. When `a` + is real the resulting eigenvalues will be real (0 imaginary + part) or occur in conjugate pairs v : (..., M, M) array The normalized (unit "length") eigenvectors, such that the |