diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-11-07 22:49:08 -0800 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-11-07 22:49:08 -0800 |
commit | a311a8d45feaafa8a8ccc15d8e66fec94b7a002d (patch) | |
tree | b210fa6c355befe079f1f7ce7e51c0655af7c818 /numpy/linalg | |
parent | a1af647b13b33963eca3f9504f1d4b2603c3e4a3 (diff) | |
download | numpy-a311a8d45feaafa8a8ccc15d8e66fec94b7a002d.tar.gz |
MAINT: collect together type mangling
Diffstat (limited to 'numpy/linalg')
-rw-r--r-- | numpy/linalg/linalg.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index 041b34b91..1f7f5f00a 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -1982,7 +1982,11 @@ def lstsq(a, b, rcond="warn"): ldb = max(n, m) if m != b.shape[0]: raise LinAlgError('Incompatible dimensions') + t, result_t = _commonType(a, b) + real_t = _linalgRealType(t) + result_real_t = _realType(result_t) + # Determine default rcond value if rcond == "warn": # 2017-08-19, 1.14.0 @@ -1997,8 +2001,6 @@ def lstsq(a, b, rcond="warn"): if rcond is None: rcond = finfo(t).eps * ldb - result_real_t = _realType(result_t) - real_t = _linalgRealType(t) bstar = zeros((ldb, n_rhs), t) bstar[:b.shape[0], :n_rhs] = b.copy() a, bstar = _fastCopyAndTranspose(t, a, bstar) |