scipy.linalg.lapack.cgels#

scipy.linalg.lapack.cgels(a, b, trans='N', lwork=..., overwrite_a=0, overwrite_b=0) = <flapack function cgels>#

Solve an overdetermined or underdetermined system by QR or LQ factorization (LAPACK cgels).

Parameters:
andarray

Matrix of shape (m, n).

bndarray

Right-hand side(s) with max(m, n) rows.

transstr, optional

'N' for the system as given, 'C' for its conjugate transpose. Default is 'N'.

lworkint, optional

Size of the workspace. Default is min(m, n) + max(min(m, n), nrhs). Use gels_lwork for the optimal value.

overwrite_aint, optional

If nonzero, a may be overwritten in place. Default is 0.

overwrite_bint, optional

If nonzero, b may be overwritten in place. Default is 0.

Returns:
lqrndarray

The QR or LQ factorization of a, as LAPACK leaves it.

xndarray

Solution in the first n rows; the remaining rows hold the residual sum of squares for each column when m > n.

infoint

0 on success; if negative, the -info-th argument had an illegal value; if positive, a is rank-deficient and no least-squares solution was computed.