scipy.linalg.lapack.dtgexc#

scipy.linalg.lapack.dtgexc(a, b, q, z, ifst, ilst, wantq=1, wantz=1, lwork=4 * n + 16, overwrite_a=0, overwrite_b=0, overwrite_q=0, overwrite_z=0) = <flapack function dtgexc>#

Reorder a generalized Schur decomposition by moving one diagonal block (LAPACK dtgexc).

Parameters:
andarray

Upper (quasi-)triangular factor of the pencil, shape (n, n).

bndarray

Upper triangular factor of the pencil, shape (n, n).

qndarray

Left Schur vectors; updated when wantq is nonzero.

zndarray

Right Schur vectors; updated when wantz is nonzero.

ifstint

Current position of the diagonal block to move, 1-based.

ilstint

Position to move it to, 1-based. LAPACK adjusts both when a block turns out to be 2x2; the adjusted values are not returned.

wantqint, optional

If nonzero, the left transformation is accumulated into q. Default is 1.

wantzint, optional

If nonzero, the right transformation is accumulated into z. Default is 1.

lworkint, optional

Workspace size, at least 4 * n + 16; -1 requests the query. Default is 4 * n + 16. The complex flavors need no workspace and take no lwork.

overwrite_aint, optional

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

overwrite_bint, optional

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

overwrite_qint, optional

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

overwrite_zint, optional

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

Returns:
andarray

The reordered first factor.

bndarray

The reordered second factor.

qndarray

The updated left Schur vectors.

zndarray

The updated right Schur vectors.

workndarray

Workspace; work[0] holds the optimal lwork. The complex flavors do not return it.

infoint

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