bundles / scipy latest / scipy / linalg / _flapack / cgebal
lapack_function
scipy.linalg._flapack:cgebal
source: build-install/usr/lib/python3.14/site-packages/scipy/linalg/_flapack.cpython-314-x86_64-linux-gnu.so
Signature
def cgebal(a, scale = 0, permute = 0, overwrite_a = 0)Summary
Balance a general matrix to improve eigenvalue accuracy (LAPACK cgebal).
Parameters
a: ndarraySquare matrix of shape
(n, n).scale: int, optionalIf nonzero, rows and columns are scaled to make their norms comparable. Default is 0.
permute: int, optionalIf nonzero, the matrix is permuted to isolate eigenvalues already in the corners. Default is 0.
overwrite_a: int, optionalIf nonzero, a may be overwritten in place. Default is 0.
Returns
ba: ndarrayThe balanced matrix.
lo: intFirst index of the balanced middle block, 0-based.
hi: intLast index of the balanced middle block, 0-based.
pivscale: ndarrayPermutation and scaling applied, packed as LAPACK returns them.
info: int0 on success; if negative, the
-info-th argument had an illegal value.
Aliases
scipy.linalg._flapack.cgebal