This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / linalg / _flapack / cgels

lapack_function

scipy.linalg._flapack:cgels

source: build-install/usr/lib/python3.14/site-packages/scipy/linalg/_flapack.cpython-314-x86_64-linux-gnu.so

Signature

def cgels(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 cgels).

Parameters

a : ndarray

Matrix of shape (m, n).

b : ndarray

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

trans : str, optional

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

lwork : int, optional

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

overwrite_a : int, optional

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

overwrite_b : int, optional

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

Returns

lqr : ndarray

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

x : ndarray

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

info : int

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.

Aliases

  • scipy.linalg._flapack.cgels