bundles / scipy latest / scipy / linalg / _flapack / dgels
lapack_function
scipy.linalg._flapack:dgels
source: build-install/usr/lib/python3.14/site-packages/scipy/linalg/_flapack.cpython-314-x86_64-linux-gnu.so
Signature
def dgels(a, b, trans = N, lwork = Ellipsis, overwrite_a = 0, overwrite_b = 0)Summary
Solve an overdetermined or underdetermined system by QR or LQ factorization (LAPACK dgels).
Parameters
a: ndarrayMatrix of shape
(m, n).b: ndarrayRight-hand side(s) with
max(m, n)rows.trans: str, optional'N'for the system as given,'T'for its transpose. Default is'N'.lwork: int, optionalSize of the workspace. Default is
min(m, n) + max(min(m, n), nrhs). Usegels_lworkfor the optimal value.overwrite_a: int, optionalIf nonzero, a may be overwritten in place. Default is 0.
overwrite_b: int, optionalIf nonzero,
bmay be overwritten in place. Default is 0.
Returns
lqr: ndarrayThe QR or LQ factorization of
a, as LAPACK leaves it.x: ndarraySolution in the first
nrows; the remaining rows hold the residual sum of squares for each column whenm > n.info: int0 on success; if negative, the
-info-th argument had an illegal value; if positive,ais rank-deficient and no least-squares solution was computed.
Aliases
scipy.linalg._flapack.dgels