scipy.linalg.lapack.ztrsyl#

scipy.linalg.lapack.ztrsyl(a, b, c, trana='N', tranb='N', isgn=1, overwrite_c=0) = <flapack function ztrsyl>#

Solve the Sylvester equation op(a) @ x + isgn * x @ op(b) = scale * c (LAPACK ztrsyl).

Parameters:
andarray

Upper (quasi-)triangular matrix of shape (m, m), in Schur canonical form.

bndarray

Upper (quasi-)triangular matrix of shape (n, n), in Schur canonical form.

cndarray

Right-hand side of shape (m, n).

tranastr, optional

'N', 'T' or 'C' for op(a). Default is 'N'.

tranbstr, optional

'N', 'T' or 'C' for op(b). Default is 'N'.

isgnint, optional

Sign of the x @ op(b) term: 1 or -1. Default is 1.

overwrite_cint, optional

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

Returns:
xndarray

The solution, overwriting c.

scalefloat

Scale factor, at most 1, chosen to avoid overflow in the solution.

infoint

0 on success; if negative, the -info-th argument had an illegal value; 1 if a and b have common or very close eigenvalues, in which case perturbed values were used.