diff --git a/slycot/analysis.py b/slycot/analysis.py index 9af03740..fb98aedb 100644 --- a/slycot/analysis.py +++ b/slycot/analysis.py @@ -67,9 +67,9 @@ def ab01nd(n, m, A, B, jobz='N', tol=0, ldwork=None): the order of the matrix A. ``n > 0``. m : int The number of system inputs, or of columns of B. ``m > 0``. - A : (n,n) array_like + A : (n, n) array_like The original state dynamics matrix A. - B : (n,m) array_like + B : (n, m) array_like The input matrix B. jobz : {'N', 'F', 'I'}, optional Indicates whether the user wishes to accumulate in a matrix Z @@ -92,12 +92,12 @@ def ab01nd(n, m, A, B, jobz='N', tol=0, ldwork=None): Returns ------- - Ac : (n,n) ndarray + Ac : (n, n) ndarray The leading ncont-by-ncont part contains the upper block Hessenberg state dynamics matrix Acont in Ac, given by Z'*A*Z, of a controllable realization for the original system. The elements below the first block-subdiagonal are set to zero. - Bc : (n,m) ndarray + Bc : (n, m) ndarray The leading ncont-by-m part of this array contains the transformed input matrix Bcont in Bc, given by ``Z'*B``, with all elements but the first block set to zero. @@ -164,16 +164,16 @@ def ab04md(type_t, n, m, p, A, B, C, D, alpha=1.0, beta=1.0, ldwork=None): p : int The number of rows of matrix C. It represents the dimension of the output vector. p > 0. - A : (n,n) array_like + A : (n, n) array_like The leading n-by-n part of this array must contain the system state matrix A. - B : (n,m) array_like + B : (n, m) array_like The leading n-by-m part of this array must contain the system input matrix B. - C : (p,n) array_like + C : (p, n) array_like The leading p-by-n part of this array must contain the system output matrix C. - D : (p,m) array_like + D : (p, m) array_like The leading p-by-m part of this array must contain the system direct transmission matrix D. alpha : double, optional @@ -189,13 +189,13 @@ def ab04md(type_t, n, m, p, A, B, C, D, alpha=1.0, beta=1.0, ldwork=None): ldwork >= max(1, n), default is max(1, n) Returns ------- - At : (n,n) ndarray + At : (n, n) ndarray The state matrix At of the transformed system. - Bt : (n,m) ndarray + Bt : (n, m) ndarray The input matrix Bt of the transformed system. - Ct : (p,n) ndarray + Ct : (p, n) ndarray The output matrix Ct of the transformed system. - Dt : (p,m) ndarray + Dt : (p, m) ndarray The transmission matrix Dt of the transformed system. Raises ------ @@ -241,28 +241,28 @@ def ab05md(n1,m1,p1,n2,p2,A1,B1,C1,D1,A2,B2,C2,D2,uplo='U'): of the matrix A2. n2 > 0. p2 : int The number of output variables from the second system. p2 > 0. - A1 : (n1,n1) array_like + A1 : (n1, n1) array_like The leading n1-by-n1 part of this array must contain the state transition matrix A1 for the first system. - B1 : (n1,m1) array_like + B1 : (n1, m1) array_like The leading n1-by-m1 part of this array must contain the input/state matrix B1 for the first system. - C1 : (p1,n1) array_like + C1 : (p1, n1) array_like The leading p1-by-n1 part of this array must contain the state/output matrix C1 for the first system. - D1 : (p1,m1) array_like + D1 : (p1, m1) array_like The leading p1-by-m1 part of this array must contain the input/output matrix D1 for the first system. - A2 : (n2,n2) array_like + A2 : (n2, n2) array_like The leading n2-by-n2 part of this array must contain the state transition matrix A2 for the second system. - B2 : (n2,p1) array_like + B2 : (n2, p1) array_like The leading n2-by-p1 part of this array must contain the input/state matrix B2 for the second system. - C2 : (p2,n2) array_like + C2 : (p2, n2) array_like The leading p2-by-n2 part of this array must contain the state/output matrix C2 for the second system. - D2 : (p2,p1) array_like + D2 : (p2, p1) array_like The leading p2-by-p1 part of this array must contain the input/output matrix D2 for the second system. uplo : {'U', 'L'}, optional @@ -278,16 +278,16 @@ def ab05md(n1,m1,p1,n2,p2,A1,B1,C1,D1,A2,B2,C2,D2,uplo='U'): The number of state variables (n1 + n2) in the resulting system, i.e. the order of the matrix A, the number of rows of B and the number of columns of C. - A : (n1+n2,n1+n2) ndarray + A : (n1+n2, n1+n2) ndarray The leading N-by-N part of this array contains the state transition matrix A for the cascaded system. - B : (n1+n2,m1) ndarray + B : (n1+n2, m1) ndarray The leading n-by-m1 part of this array contains the input/state matrix B for the cascaded system. - C : (p2,n1+n2) ndarray + C : (p2, n1+n2) ndarray The leading p2-by-n part of this array contains the state/output matrix C for the cascaded system. - D : (p2,m1) ndarray + D : (p2, m1) ndarray The leading p2-by-m1 part of this array contains the input/output matrix D for the cascaded system. @@ -333,28 +333,28 @@ def ab05nd(n1,m1,p1,n2,A1,B1,C1,D1,A2,B2,C2,D2,alpha=1.0,ldwork=None): n2 : int The number of state variables in the second system, i.e. the order of the matrix A2. n2 > 0. - A1 : (n1,n1) array_like + A1 : (n1, n1) array_like The leading n1-by-n1 part of this array must contain the state transition matrix A1 for the first system. - B1 : (n1,m1) array_like + B1 : (n1, m1) array_like The leading n1-by-m1 part of this array must contain the input/state matrix B1 for the first system. - C1 : (p1,n1) array_like + C1 : (p1, n1) array_like The leading p1-by-n1 part of this array must contain the state/output matrix C1 for the first system. - D1 : (p1,m1) array_like + D1 : (p1, m1) array_like The leading p1-by-m1 part of this array must contain the input/output matrix D1 for the first system. - A2 : (n2,n2) array_like + A2 : (n2, n2) array_like The leading n2-by-n2 part of this array must contain the state transition matrix A2 for the second system. - B2 : (n2,p1) array_like + B2 : (n2, p1) array_like The leading n2-by-p1 part of this array must contain the input/state matrix B2 for the second system. - C2 : (m1,n2) array_like + C2 : (m1, n2) array_like The leading m1-by-n2 part of this array must contain the state/output matrix C2 for the second system. - D2 : (m1,p1) array_like + D2 : (m1, p1) array_like The leading m1-by-p1 part of this array must contain the input/output matrix D2 for the second system. alpha : float, optional @@ -373,16 +373,16 @@ def ab05nd(n1,m1,p1,n2,A1,B1,C1,D1,A2,B2,C2,D2,alpha=1.0,ldwork=None): The number of state variables (n1 + n2) in the connected system, i.e. the order of the matrix A, the number of rows of B and the number of columns of C. - A : (n1+n2,n1+n2) ndarray + A : (n1+n2, n1+n2) ndarray The leading n-by-n part of this array contains the state transition matrix A for the connected system. - B : (n1+n2,m1) ndarray + B : (n1+n2, m1) ndarray The leading n-by-m1 part of this array contains the input/state matrix B for the connected system. - C : (p1,n1,n2) ndarray + C : (p1, n1, n2) ndarray The leading p1-by-n part of this array contains the state/output matrix C for the connected system. - D : (p1,m1) ndarray + D : (p1, m1) ndarray The leading p1-by-m1 part of this array contains the input/output matrix D for the connected system. @@ -419,19 +419,19 @@ def ab07nd(n,m,A,B,C,D,ldwork=None): Parameters ---------- n : int - The order of the state matrix A. n >= 0. + The order of the state matrix A. n >= 0. m : int - The number of system inputs and outputs. m >= 0. - A : (n,n) array_like + The number of system inputs and outputs. m >= 0. + A : (n, n) array_like The leading n-by-n part of this array must contain the state matrix A of the original system. - B : (n,m) array_like + B : (n, m) array_like The leading n-by-m part of this array must contain the input matrix B of the original system. - C : (m,n) array_like + C : (m, n) array_like The leading m-by-n part of this array must contain the output matrix C of the original system. - D : (m,m) array_like + D : (m, m) array_like The leading m-by-m part of this array must contain the feedthrough matrix D of the original system. ldwork : int, optional @@ -440,16 +440,16 @@ def ab07nd(n,m,A,B,C,D,ldwork=None): Returns ------- - Ai : (n,n) ndarray + Ai : (n, n) ndarray The leading n-by-n part of this array contains the state matrix Ai of the inverse system. - Bi : (n,m) ndarray + Bi : (n, m) ndarray The leading n-by-m part of this array contains the input matrix Bi of the inverse system. - Ci : (m,n) ndarray + Ci : (m, n) ndarray The leading m-by-n part of this array contains the output matrix Ci of the inverse system. - Di : (m,m) ndarray + Di : (m, m) ndarray The leading m-by-m part of this array contains the feedthrough matrix Di of the inverse system. rcond : float @@ -707,11 +707,11 @@ def ab09ad(dico,job,equil,n,m,p,A,B,C,nr=None,tol=0,ldwork=None): Balance `B` or not `N` equil : {'S', 'N'} Scale `S` or not `N` - n : input int + n : int The number of state variables. n >= 0. - m : input int + m : int The number of system inputs. m >= 0. - p : input int + p : int The number of system outputs. p >= 0. A : (n, n) array_like The leading n-by-n part of this array must contain the state @@ -994,7 +994,7 @@ def ab09bd(dico,job,equil,n,m,p,A,B,C,D,nr=None,tol1=0,tol2=0,ldwork=None): nr is the desired order of the resulting reduced order system. 0 <= nr <= n. Default is None. - tol1 : double precision, optional + tol1 : float, optional If ordsel = 'A', tol1 contains the tolerance for determining the order of reduced system. For model reduction, the recommended value is @@ -1007,7 +1007,7 @@ def ab09bd(dico,job,equil,n,m,p,A,B,C,D,nr=None,tol1=0,tol2=0,ldwork=None): This value is used by default if tol1 <= 0 on entry. If ordsel = 'F', the value of tol1 is ignored. Default is `0.0`. - tol2 : double precision, optional + tol2 : float, optional The tolerance for determining the order of a minimal realization of the given system. The recommended value is tol2 = n*eps*hnorm(A,B,C). This value is used by default @@ -1148,7 +1148,7 @@ def ab09md(dico,job,equil,n,m,p,A,B,C,alpha=None,nr=None,tol=0,ldwork=None): On entry with ordsel = 'F', nr is the desired order of the resulting reduced order system. 0 <= nr <= n. Default is None. - tol : double precision, optional + tol : float, optional If ordsel = 'A', tol contains the tolerance for determining the order of reduced system. For model reduction, the recommended value is @@ -1322,7 +1322,7 @@ def ab09nd(dico,job,equil,n,m,p,A,B,C,D,alpha=None,nr=None,tol1=0,tol2=0,ldwork= nr is the desired order of the resulting reduced order system. 0 <= nr <= n. Default is None. - tol1 : double precision, optional + tol1 : float, optional If ordsel = 'A', tol1 contains the tolerance for determining the order of reduced system. For model reduction, the recommended value is @@ -1338,7 +1338,7 @@ def ab09nd(dico,job,equil,n,m,p,A,B,C,D,alpha=None,nr=None,tol1=0,tol2=0,ldwork= of the alpha-stable part. If ordsel = 'F', the value of tol1 is ignored. Default is `0.0`. - tol2 : double precision, optional + tol2 : float, optional The tolerance for determining the order of a minimal realization of the alpha-stable part of the given system. The recommended value is tol2 = ns*eps*hnorm(As,Bs,Cs). @@ -1670,7 +1670,7 @@ def ab13ed(n, A, tol = 9.0): ---------- n : int The order of the matrix A. ``n >= 0.`` - A : (n,n) array_like + A : (n, n) array_like The leading n-by-n part of this array must contain the matrix A. tol : float, optional Specifies the accuracy with which low and high approximate