diff options
author | cookedm <cookedm@localhost> | 2006-07-14 09:42:54 +0000 |
---|---|---|
committer | cookedm <cookedm@localhost> | 2006-07-14 09:42:54 +0000 |
commit | 46fa7a119d9995f5f348694ae0595f2abdf44762 (patch) | |
tree | 471aae8ca795ae1fe12257a5590fa1dd40025781 /numpy/linalg/linalg.py | |
parent | acd97c630b02b7a48b715eaf67155784642d95d8 (diff) | |
download | numpy-46fa7a119d9995f5f348694ae0595f2abdf44762.tar.gz |
numpy.linalg: fix bug where complex arrays weren't being returned.
Also improved test cases.
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 1a0dd3c6e..142de2340 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -18,7 +18,8 @@ __all__ = ['solve', from numpy.core import array, asarray, zeros, empty, transpose, \ intc, single, double, csingle, cdouble, inexact, complexfloating, \ newaxis, ravel, all, Inf, dot, add, multiply, identity, sqrt, \ - maximum, nonzero, diagonal, arange, fastCopyAndTranspose, sum + maximum, nonzero, diagonal, arange, fastCopyAndTranspose, sum, \ + argsort from numpy.lib import triu from numpy.linalg import lapack_lite @@ -75,7 +76,7 @@ def _commonType(*arrays): result_type = _complex_types_map[result_type] else: t = double - return t, rt + return t, result_type def _castCopyAndTranspose(type, *arrays): if len(arrays) == 1: @@ -351,7 +352,7 @@ def eigh(a, UPLO='L'): if results['info'] > 0: raise LinAlgError, 'Eigenvalues did not converge' at = a.transpose().astype(result_t) - return w.astype(result_t), wrap(at) + return w.astype(_realType(result_t)), wrap(at) # Singular value decomposition |