linalg.decomp_schur

Schur decomposition functions.

Module Contents

Functions

schur(a,output=”real”,lwork=None,overwrite_a=False,sort=None,check_finite=True) Compute Schur decomposition of a matrix.
_commonType(*arrays)
_castCopy(type,*arrays)
rsf2csf(T,Z,check_finite=True) Convert real Schur form to complex Schur form.
schur(a, output="real", lwork=None, overwrite_a=False, sort=None, check_finite=True)

Compute Schur decomposition of a matrix.

The Schur decomposition is:

A = Z T Z^H

where Z is unitary and T is either upper-triangular, or for real Schur decomposition (output=’real’), quasi-upper triangular. In the quasi-triangular form, 2x2 blocks describing complex-valued eigenvalue pairs may extrude from the diagonal.

a : (M, M) array_like
Matrix to decompose
output : {‘real’, ‘complex’}, optional
Construct the real or complex Schur decomposition (for real matrices).
lwork : int, optional
Work array size. If None or -1, it is automatically computed.
overwrite_a : bool, optional
Whether to overwrite data in a (may improve performance).
sort : {None, callable, ‘lhp’, ‘rhp’, ‘iuc’, ‘ouc’}, optional

Specifies whether the upper eigenvalues should be sorted. A callable may be passed that, given a eigenvalue, returns a boolean denoting whether the eigenvalue should be sorted to the top-left (True). Alternatively, string parameters may be used:

'lhp'   Left-hand plane (x.real < 0.0)
'rhp'   Right-hand plane (x.real > 0.0)
'iuc'   Inside the unit circle (x*x.conjugate() <= 1.0)
'ouc'   Outside the unit circle (x*x.conjugate() > 1.0)

Defaults to None (no sorting).

check_finite : bool, optional
Whether to check that the input matrix contains only finite numbers. Disabling may give a performance gain, but may result in problems (crashes, non-termination) if the inputs do contain infinities or NaNs.
T : (M, M) ndarray
Schur form of A. It is real-valued for the real Schur decomposition.
Z : (M, M) ndarray
An unitary Schur transformation matrix for A. It is real-valued for the real Schur decomposition.
sdim : int
If and only if sorting was requested, a third return value will contain the number of eigenvalues satisfying the sort condition.
LinAlgError

Error raised under three conditions:

  1. The algorithm failed due to a failure of the QR algorithm to compute all eigenvalues
  2. If eigenvalue sorting was requested, the eigenvalues could not be reordered due to a failure to separate eigenvalues, usually because of poor conditioning
  3. If eigenvalue sorting was requested, roundoff errors caused the leading eigenvalues to no longer satisfy the sorting condition

rsf2csf : Convert real Schur form to complex Schur form

_commonType(*arrays)
_castCopy(type, *arrays)
rsf2csf(T, Z, check_finite=True)

Convert real Schur form to complex Schur form.

Convert a quasi-diagonal real-valued Schur form to the upper triangular complex-valued Schur form.

T : (M, M) array_like
Real Schur form of the original matrix
Z : (M, M) array_like
Schur transformation matrix
check_finite : bool, optional
Whether to check that the input matrices contain only finite numbers. Disabling may give a performance gain, but may result in problems (crashes, non-termination) if the inputs do contain infinities or NaNs.
T : (M, M) ndarray
Complex Schur form of the original matrix
Z : (M, M) ndarray
Schur transformation matrix corresponding to the complex form

schur : Schur decompose a matrix