summaryrefslogtreecommitdiff
path: root/numpy/linalg/linalg.py
diff options
context:
space:
mode:
authorjason king <pizza@netspace.net.au>2015-09-16 21:22:44 +1000
committerjason king <pizza@netspace.net.au>2015-09-16 21:49:27 +1000
commitdb457fb84ba54f9a2ffcdcda2af86fa4012e9237 (patch)
tree8b5fd92efaf94f996ac92f947548c8d92f7ed7b2 /numpy/linalg/linalg.py
parent772c80b1ce1db7e30497fcf555ac9af56b0d7fce (diff)
downloadnumpy-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.py7
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