scipy.linalg.lapack.cgelss#

scipy.linalg.lapack.cgelss(a, b, cond=-1.0, lwork=..., overwrite_a=0, overwrite_b=0) = <flapack function cgelss>#

Solve a least-squares problem by singular value decomposition (LAPACK cgelss).

Parameters:
andarray

Matrix of shape (m, n).

bndarray

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

condfloat, optional

Singular values below cond times the largest are treated as zero. Default is -1.0, which uses machine precision.

lworkint, optional

Size of the workspace. Default is routine-specific. Use gelss_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:
vndarray

The first min(m, n) right singular vectors of a, as LAPACK leaves them.

xndarray

Minimum-norm solution in the first n rows.

sndarray

Singular values of a, in descending order.

rankint

Effective rank of a, determined using cond.

workndarray

Workspace actually used; work[0] is the optimal lwork.

infoint

0 on success; if negative, the -info-th argument had an illegal value; if positive, the algorithm failed to converge.