diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-07-25 22:06:02 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-07-25 22:06:02 +0000 |
commit | 9bda193417b278dce14c22b1ac5c8bc1a6717365 (patch) | |
tree | 3d5139771323e3cd612ce864f01a356b6219e832 /numpy/linalg/linalg.py | |
parent | e116574cde770234beffaf2be6cd542472679313 (diff) | |
download | numpy-9bda193417b278dce14c22b1ac5c8bc1a6717365.tar.gz |
Add broadcasting behavior to random-number generators. Fix cholesky to keep matrix return.
Diffstat (limited to 'numpy/linalg/linalg.py')
-rw-r--r-- | numpy/linalg/linalg.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index a4b6dc5a7..9f1e9010b 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -165,7 +165,8 @@ def cholesky(a): if results['info'] > 0: raise LinAlgError, 'Matrix is not positive definite - Cholesky decomposition cannot be computed' s = triu(a, k=0).transpose() - return array(s, dtype=result_t, copy=True) + if (s.dtype != result_t): + return s.astype(result_t) # Eigenvalues def eigvals(a): |