Skip to content

Commit

Permalink
Change tg01fd docstring sections to numpydoc style
Browse files Browse the repository at this point in the history
  • Loading branch information
KybernetikJo committed Aug 27, 2023
1 parent edc63ab commit 1ef88af
Showing 1 changed file with 140 additions and 126 deletions.
266 changes: 140 additions & 126 deletions slycot/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -1137,132 +1137,146 @@ def tg01fd(l,n,m,p,A,E,B,C,Q=None,Z=None,compq='N',compz='N',joba='N',tol=0.0,ld
The left and/or right orthogonal transformations performed
to reduce E and A22 can be optionally accumulated.
Required arguments:
l : input int
The number of rows of matrices A, B, and E. l >= 0.
n : input int
The number of columns of matrices A, E, and C. n >= 0.
m : input int
The number of columns of matrix B. m >= 0.
p : input int
The number of rows of matrix C. p >= 0.
A : rank-2 array('d') with bounds (l,n)
The leading l-by-n part of this array must
contain the state dynamics matrix A.
E : rank-2 array('d') with bounds (l,n)
The leading l-by-n part of this array must
contain the descriptor matrix E.
B : rank-2 array('d') with bounds (l,m)
The leading L-by-M part of this array must
contain the input/state matrix B.
C : rank-2 array('d') with bounds (p,n)
The leading P-by-N part of this array must
contain the state/output matrix C.
Optional arguments:
Q : rank-2 array('d') with bounds (l,l)
If COMPQ = 'N': Q is not referenced.
If COMPQ = 'I': Q need not be set.
If COMPQ = 'U': The leading l-by-l part of this
array must contain an orthogonal matrix
Q1.
Z : rank-2 array('d') with bounds (n,n)
If COMPZ = 'N': Z is not referenced.
If COMPZ = 'I': Z need not be set.
If COMPZ = 'U': The leading n-by-n part of this
array must contain an orthogonal matrix
Z1.
compq := 'N' input string(len=1)
= 'N': do not compute Q.
= 'I': Q is initialized to the unit matrix, and the
orthogonal matrix Q is returned.
= 'U': Q must contain an orthogonal matrix Q1 on entry,
and the product Q1*Q is returned.
compz := 'N' input string(len=1)
= 'N': do not compute Z.
= 'I': Z is initialized to the unit matrix, and the
orthogonal matrix Z is returned.
= 'U': Z must contain an orthogonal matrix Z1 on entry,
and the product Z1*Z is returned.
joba := 'N' input string(len=1)
= 'N': do not reduce A22.
= 'R': reduce A22 to a SVD-like upper triangular form.
= 'T': reduce A22 to an upper trapezoidal form.
tol := 0 input float
The tolerance to be used in determining the rank of E
and of A22. If the user sets TOL > 0, then the given
value of TOL is used as a lower bound for the
reciprocal condition numbers of leading submatrices
of R or R22 in the QR decompositions E * P = Q * R of E
or A22 * P22 = Q22 * R22 of A22.
A submatrix whose estimated condition number is less than
1/TOL is considered to be of full rank. If the user sets
TOL <= 0, then an implicitly computed, default tolerance,
defined by TOLDEF = L*N*EPS, is used instead, where
EPS is the machine precision (see LAPACK Library routine
DLAMCH). TOL < 1.
ldwork : input int
The length of the cache array.
ldwork >= MAX( 1, n+p, MIN(l,n)+MAX(3*n-1,m,l) ).
For optimal performance, ldwork should be larger.
Return objects:
A : rank-2 array('d') with bounds (l,n)
On entry, the leading L-by-N part of this array must
contain the state dynamics matrix A.
On exit, the leading L-by-N part of this array contains
the transformed matrix Q'*A*Z. If JOBA = 'T', this matrix
is in the form
( A11 * * )
Q'*A*Z = ( * Ar X ) ,
( * 0 0 )
where A11 is a RANKE-by-RANKE matrix and Ar is a
RNKA22-by-RNKA22 invertible upper triangular matrix.
If JOBA = 'R' then A has the above form with X = 0.
E : rank-2 array('d') with bounds (l,n)
The leading L-by-N part of this array contains
the transformed matrix Q'*E*Z.
( Er 0 )
Q'*E*Z = ( ) ,
( 0 0 )
where Er is a RANKE-by-RANKE upper triangular invertible
matrix.
B : rank-2 array('d') with bounds (l,m)
The leading L-by-M part of this array contains
the transformed matrix Q'*B.
C : rank-2 array('d') with bounds (p,n)
The leading P-by-N part of this array contains
the transformed matrix C*Z.
Q : rank-2 array('d') with bounds (l,l)
If COMPQ = 'N': Q is not referenced.
If COMPQ = 'I': The leading L-by-L part of this
array contains the orthogonal matrix Q,
where Q' is the product of Householder
transformations which are applied to A,
E, and B on the left.
If COMPQ = 'U': The leading L-by-L part of this
array contains the orthogonal matrix
Q1*Q.
Z : rank-2 array('d') with bounds (n,n)
If COMPZ = 'N': Z is not referenced.
If COMPZ = 'I': The leading N-by-N part of this
array contains the orthogonal matrix Z,
which is the product of Householder
transformations applied to A, E, and C
on the right.
If COMPZ = 'U': The leading N-by-N part of this
array contains the orthogonal matrix
Z1*Z.
ranke : output int
The estimated rank of matrix E, and thus also the order
of the invertible upper triangular submatrix Er.
rnka22 : output int
If JOBA = 'R' or 'T', then RNKA22 is the estimated rank of
matrix A22, and thus also the order of the invertible
upper triangular submatrix Ar.
If JOBA = 'N', then RNKA22 is not referenced.
Parameters
----------
l : int
The number of rows of matrices A, B, and E. l >= 0.
n : int
The number of columns of matrices A, E, and C. n >= 0.
m : int
The number of columns of matrix B. m >= 0.
p : int
The number of rows of matrix C. p >= 0.
A : (l, n) array_like
The leading l-by-n part of this array must
contain the state dynamics matrix A.
E : (l, n) array_like
The leading l-by-n part of this array must
contain the descriptor matrix E.
B : (l, m) array_like
The leading L-by-M part of this array must
contain the input/state matrix B.
C : (p, n) array_like
The leading P-by-N part of this array must
contain the state/output matrix C.
Q : (l, l) array_like, optional
If COMPQ = 'N': Q is not referenced.
If COMPQ = 'I': Q need not be set.
If COMPQ = 'U': The leading l-by-l part of this
array must contain an orthogonal matrix
Q1.
Default is None.
Z : (n, n) array_like, optional
If COMPZ = 'N': Z is not referenced.
If COMPZ = 'I': Z need not be set.
If COMPZ = 'U': The leading n-by-n part of this
array must contain an orthogonal matrix
Z1.
Default is None.
compq : {'N', 'I', 'U'}, optional
= 'N': do not compute Q.
= 'I': Q is initialized to the unit matrix, and the
orthogonal matrix Q is returned.
= 'U': Q must contain an orthogonal matrix Q1 on entry,
and the product Q1*Q is returned.
Default is 'N'.
compz : {'N', 'I', 'U'}, optional
= 'N': do not compute Z.
= 'I': Z is initialized to the unit matrix, and the
orthogonal matrix Z is returned.
= 'U': Z must contain an orthogonal matrix Z1 on entry,
and the product Z1*Z is returned.
Default is 'N'.
joba : {'N', 'R', 'T'}, optional
= 'N': do not reduce A22.
= 'R': reduce A22 to a SVD-like upper triangular form.
= 'T': reduce A22 to an upper trapezoidal form.
Default is 'N'.
tol : float, optional
The tolerance to be used in determining the rank of E
and of A22. If the user sets TOL > 0, then the given
value of TOL is used as a lower bound for the
reciprocal condition numbers of leading submatrices
of R or R22 in the QR decompositions E * P = Q * R of E
or A22 * P22 = Q22 * R22 of A22.
A submatrix whose estimated condition number is less than
1/TOL is considered to be of full rank. If the user sets
TOL <= 0, then an implicitly computed, default tolerance,
defined by TOLDEF = L*N*EPS, is used instead, where
EPS is the machine precision (see LAPACK Library routine
DLAMCH). TOL < 1.
Default is `0.0`.
ldwork : int, optional
The length of the cache array.
ldwork >= MAX( 1, n+p, MIN(l,n)+MAX(3*n-1,m,l) ).
For optimal performance, ldwork should be larger.
Default is None.
Returns
-------
A : (l, n) ndarray
On entry, the leading L-by-N part of this array must
contain the state dynamics matrix A.
On exit, the leading L-by-N part of this array contains
the transformed matrix Q'*A*Z. If JOBA = 'T', this matrix
is in the form
( A11 * * )
Q'*A*Z = ( * Ar X ) ,
( * 0 0 )
where A11 is a RANKE-by-RANKE matrix and Ar is a
RNKA22-by-RNKA22 invertible upper triangular matrix.
If JOBA = 'R' then A has the above form with X = 0.
E : (l, n) ndarray
The leading L-by-N part of this array contains
the transformed matrix Q'*E*Z.
( Er 0 )
Q'*E*Z = ( ) ,
( 0 0 )
where Er is a RANKE-by-RANKE upper triangular invertible
matrix.
B : (l, m) ndarray
The leading L-by-M part of this array contains
the transformed matrix Q'*B.
C : (p, n) ndarray
The leading P-by-N part of this array contains
the transformed matrix C*Z.
Q : (l, l) ndarray
If COMPQ = 'N': Q is not referenced.
If COMPQ = 'I': The leading L-by-L part of this
array contains the orthogonal matrix Q,
where Q' is the product of Householder
transformations which are applied to A,
E, and B on the left.
If COMPQ = 'U': The leading L-by-L part of this
array contains the orthogonal matrix
Q1*Q.
Z : (n, n) ndarray
If COMPZ = 'N': Z is not referenced.
If COMPZ = 'I': The leading N-by-N part of this
array contains the orthogonal matrix Z,
which is the product of Householder
transformations applied to A, E, and C
on the right.
If COMPZ = 'U': The leading N-by-N part of this
array contains the orthogonal matrix
Z1*Z.
ranke : int
The estimated rank of matrix E, and thus also the order
of the invertible upper triangular submatrix Er.
rnka22 : int
If JOBA = 'R' or 'T', then RNKA22 is the estimated rank of
matrix A22, and thus also the order of the invertible
upper triangular submatrix Ar.
If JOBA = 'N', then RNKA22 is not referenced.
Raises
------
SlycotParameterError
:info = -i: the i-th argument had an illegal value
"""

hidden = ' (hidden by the wrapper)'
Expand Down

0 comments on commit 1ef88af

Please sign in to comment.