This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / linalg / _flapack / chegv

lapack_function

scipy.linalg._flapack:chegv

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

Signature

def chegv(a, b, itype = 1, jobz = V, uplo = L, lwork = Ellipsis, overwrite_a = 0, overwrite_b = 0)

Summary

Solve the generalized Hermitian-definite eigenproblem (LAPACK chegv).

Parameters

a : ndarray

Hermitian matrix of shape (n, n).

b : ndarray

Positive definite matrix of shape (n, n).

itype : int, optional

Which generalized problem to solve: 1 for a @ x = w * b @ x, 2 for a @ b @ x = w * x, 3 for b @ a @ x = w * x. Default is 1.

jobz : str, optional

'V' to compute eigenvectors, 'N' for eigenvalues only. Default is 'V'. This family spells it as a letter where syev uses compute_v.

uplo : str, optional

'U' or 'L' for the triangle of a to reference. Default is 'L' -- note that is the opposite of the lower=0 default elsewhere in this group, so the same matrix can give different answers between families.

lwork : int, optional

Size of the workspace. Default is max(2 * n - 1, 1). Use chegv_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

w : ndarray

Eigenvalues in ascending order, length n. Real for every flavor.

v : ndarray

Eigenvectors as columns when jobz is 'V', normalized per itype.

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