This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / linalg / _flapack / dgelss

lapack_function

scipy.linalg._flapack:dgelss

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

Signature

def dgelss(a, b, cond = -1.0, lwork = Ellipsis, overwrite_a = 0, overwrite_b = 0)

Summary

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

Parameters

a : ndarray

Matrix of shape (m, n).

b : ndarray

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

cond : float, optional

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

lwork : int, optional

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

v : ndarray

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

x : ndarray

Minimum-norm solution in the first n rows.

s : ndarray

Singular values of a, in descending order.

rank : int

Effective rank of a, determined using cond.

work : ndarray

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

info : int

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

Aliases

  • scipy.linalg._flapack.dgelss