scipy.linalg.lapack.sstemr#
- scipy.linalg.lapack.sstemr(d, e, range, vl, vu, il, iu, compute_v=1, lwork=18 * n, liwork=10 * n, overwrite_d=0, overwrite_e=0) = <flapack function sstemr>#
Compute selected eigenvalues and optionally eigenvectors of a symmetric tridiagonal matrix by the MRRR algorithm (LAPACK
sstemr).- Parameters:
- dndarray
Diagonal elements of the symmetric tridiagonal matrix, length
n.- endarray
Off-diagonal elements in the leading
n - 1entries, lengthn. The final entry need not be set; LAPACK uses it as workspace.- rangeint
Which eigenvalues to compute: 0 for all, 1 for those in
(vl, vu], 2 for those with indices il through iu.- vlfloat
Lower bound of the half-open interval; used only when range is 1.
- vufloat
Upper bound of the half-open interval; used only when range is 1.
- ilint
Index of the smallest eigenvalue to return, 1-based; used only when range is 2.
- iuint
Index of the largest eigenvalue to return, 1-based; used only when range is 2.
- compute_vint, optional
If nonzero, eigenvectors are computed. Default is 1.
- lworkint, optional
Size of the workspace. Default is
18 * nwhen compute_v is nonzero and12 * notherwise. Usestemr_lworkfor the optimal value.- liworkint, optional
Size of the integer workspace. Default is
10 * nwhen compute_v is nonzero and8 * notherwise. Usestemr_lworkfor the optimal value.- overwrite_dint, optional
If nonzero, d may be overwritten in place. Default is 0.
- overwrite_eint, optional
If nonzero, e may be overwritten in place. Default is 0.
- Returns:
- mint
Number of eigenvalues found; only
w[:m]andz[:, :m]are meaningful.- wndarray
The computed eigenvalues in ascending order, length
n.- zndarray
Orthonormal eigenvectors as columns, shape
(n, n). Not referenced when compute_v is 0.- infoint
0 on success; if negative, the
-info-th argument had an illegal value; if positive, the algorithm failed to converge.