scipy.linalg.lapack.dgelsd#

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

Solve a least-squares problem by divide-and-conquer SVD (LAPACK dgelsd).

Parameters:
andarray

Matrix of shape (m, n).

bndarray

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

lworkint

Size of the workspace. Use gelsd_lwork for the required value.

size_iworkint

Size of the integer workspace, as reported by gelsd_lwork.

condfloat, optional

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

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:
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.

infoint

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