diff options
author | jason king <pizza@netspace.net.au> | 2015-09-16 21:22:44 +1000 |
---|---|---|
committer | jason king <pizza@netspace.net.au> | 2015-09-16 21:49:27 +1000 |
commit | db457fb84ba54f9a2ffcdcda2af86fa4012e9237 (patch) | |
tree | 8b5fd92efaf94f996ac92f947548c8d92f7ed7b2 /numpy/linalg/linalg.py | |
parent | 772c80b1ce1db7e30497fcf555ac9af56b0d7fce (diff) | |
download | numpy-db457fb84ba54f9a2ffcdcda2af86fa4012e9237.tar.gz |
DOC: linalg.eig will return an array of a real type if the
complex part equates to exactly 0. Updating doco to say this.
Doco implied return type was always complex.
Diffstat (limited to 'numpy/linalg/linalg.py')
-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 |