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

bundles / scipy latest / scipy / linalg / _flapack / sgebal

lapack_function

scipy.linalg._flapack:sgebal

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

Signature

def sgebal(a, scale = 0, permute = 0, overwrite_a = 0)

Summary

Balance a general matrix to improve eigenvalue accuracy (LAPACK sgebal).

Parameters

a : ndarray

Square matrix of shape (n, n).

scale : int, optional

If nonzero, rows and columns are scaled to make their norms comparable. Default is 0.

permute : int, optional

If nonzero, the matrix is permuted to isolate eigenvalues already in the corners. Default is 0.

overwrite_a : int, optional

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

Returns

ba : ndarray

The balanced matrix.

lo : int

First index of the balanced middle block, 0-based.

hi : int

Last index of the balanced middle block, 0-based.

pivscale : ndarray

Permutation and scaling applied, packed as LAPACK returns them.

info : int

0 on success; if negative, the -info-th argument had an illegal value.

Aliases

  • scipy.linalg._flapack.sgebal