scipy.linalg.lapack.cgesvdx#

scipy.linalg.lapack.cgesvdx(a, compute_u=1, compute_vh=1, range='A', vl=0.0, vu=0.0, il=1, iu=min(m, n), lwork=..., overwrite_a=0) = <flapack function cgesvdx>#

Compute all or a selected subset of the singular values and, optionally, the singular vectors of a general matrix, a = u @ diag(s) @ vt (LAPACK cgesvdx).

Parameters:
andarray

Matrix of shape (m, n).

compute_u{0, 1}, optional

If 1, left singular vectors are computed; if 0, they are not. Default is 1.

compute_vh{0, 1}, optional

If 1, right singular vectors are computed; if 0, they are not. Default is 1.

rangestr, optional

'A' for all singular values, 'V' for those in the half-open interval (vl, vu], 'I' for the il-th through iu-th largest. Default is 'A'.

vlfloat, optional

Lower bound of the interval, at least 0; used only when range is 'V'. Default is 0.0.

vufloat, optional

Upper bound of the interval, greater than vl; used only when range is 'V'. Default is 0.0, so it must be given with range='V'.

ilint, optional

Index of the first singular value to return, 1-based in descending order, so 1 is the largest; used only when range is 'I'. Default is 1.

iuint, optional

Index of the last singular value to return, 1-based in descending order; used only when range is 'I'. Default is min(m, n).

lworkint, optional

Size of the workspace, passed to LAPACK as given. Default is max(k * (k + 5), 3 * k + max(m, n)) with k = min(m, n), or 1 when a is empty. Use cgesvdx_lwork for the optimal value. A size below what LAPACK needs gives info = -19.

overwrite_aint, optional

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

Returns:
undarray

Left singular vectors as columns, shape (m, min(m, n)); only the first ns columns are meaningful. A (1, 1) placeholder when compute_u is 0.

sndarray

Singular values in descending order, length min(m, n); only the first ns entries are meaningful.

vtndarray

Right singular vectors as rows, shape (min(m, n), n); only the first ns rows are meaningful. A (1, 1) placeholder when compute_vh is 0.

nsint

Number of singular values found: min(m, n) for range='A', iu - il + 1 for range='I'.

infoint

0 on success; if negative, the -info-th argument had an illegal value; if positive, that many singular vectors failed to converge, or 2 * min(m, n) + 1 for an internal error in ?bdsvdx.