scipy.linalg.lapack.dgglse#

scipy.linalg.lapack.dgglse(a, b, c, d, lwork=m + n + p, overwrite_a=0, overwrite_b=0, overwrite_c=0, overwrite_d=0) = <flapack function dgglse>#

Solve an equality-constrained least squares problem (LAPACK dgglse).

Minimizes norm(c - a @ x) subject to b @ x == d.

Parameters:
andarray

Least squares matrix, shape (m, n).

bndarray

Constraint matrix, shape (p, n) with n - m <= p <= n.

cndarray

Least squares right-hand side, length m.

dndarray

Constraint right-hand side, length p; empty when there are no constraints.

lworkint, optional

Workspace size; -1 requests the query. Default is m + n + p.

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.

overwrite_cint, optional

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

overwrite_dint, optional

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

Returns:
tndarray

The generalized RQ factorization left in a.

rndarray

The triangular factor left in b.

resndarray

The residual information left in c.

xndarray

The solution, length n.

infoint

0 on success; if negative, the -info-th argument had an illegal value.