8000 MAINT: collect together type mangling · numpy/numpy@a311a8d · GitHub
[go: up one dir, main page]

Skip to content

Commit a311a8d

Browse files
committed
MAINT: collect together type mangling
1 parent a1af647 commit a311a8d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

numpy/linalg/linalg.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,7 +1982,11 @@ def lstsq(a, b, rcond="warn"):
19821982
ldb = max(n, m)
19831983
if m != b.shape[0]:
19841984
raise LinAlgError('Incompatible dimensions')
1985+
19851986
t, result_t = _commonType(a, b)
1987+
real_t = _linalgRealType(t)
1988+
result_real_t = _realType(result_t)
1989+
19861990
# Determine default rcond value
19871991
if rcond == "warn":
19881992
# 2017-08-19, 1.14.0
@@ -1997,8 +2001,6 @@ def lstsq(a, b, rcond="warn"):
19972001
if rcond is None:
19982002
rcond = finfo(t).eps * ldb
19992003

2000-
result_real_t = _realType(result_t)
2001-
real_t = _linalgRealType(t)
20022004
bstar = zeros((ldb, n_rhs), t)
20032005
bstar[:b.shape[0], :n_rhs] = b.copy()
20042006
a, bstar = _fastCopyAndTranspose(t, a, bstar)

0 commit comments

Comments
 (0)
0