@@ -137,80 +137,80 @@ def mb03rd(n, A, X=None, jobx='U', sort='N', pmax=1.0, tol=0.0):
137
137
138
138
Parameters
139
139
----------
140
- n : int
141
- The order of the matrices `A` and `X`. `n` >= 0.
142
- A : (n, n) array_like
143
- The matrix `A` to be block-diagonalized, in real Schur form.
144
- X : (n, n) array_like, optional
145
- A given matrix `X`, for accumulation of transformations (only if
146
- `jobx`='U'). Default value is identity matrix of order `n`.
147
- jobx : {'N', 'U'}, optional
148
- Specifies whether or not the transformations are
149
- accumulated, as follows:
150
-
151
- := 'N': The transformations are not accumulated
152
- := 'U': The transformations are accumulated in `Xr` (default)
153
-
154
- sort : {'N', 'S', 'C', 'B'}, optional
155
- Specifies whether or not the diagonal blocks of the real
156
- Schur form are reordered, as follows:
157
-
158
- := 'N': The diagonal blocks are not reordered (default);
159
- := 'S': The diagonal blocks are reordered before each
160
- step of reduction, so that clustered eigenvalues
161
- appear in the same block;
162
- := 'C': The diagonal blocks are not reordered, but the
163
- "closest-neighbour" strategy is used instead of
164
- the standard "closest to the mean" strategy
165
- (see Notes_);
166
- := 'B': The diagonal blocks are reordered before each
167
- step of reduction, and the "closest-neighbour"
168
- strategy is used (see Notes_).
169
-
170
- pmax : float, optional
171
- An upper bound for the infinity norm of elementary
172
- submatrices of the individual transformations used for
173
- reduction (see Notes_). `pmax` >= 1.0
174
- tol : float, optional
175
- The tolerance to be used in the ordering of the diagonal
176
- blocks of the real Schur form matrix.
177
- If the user sets `tol` > 0, then the given value of `tol` is
178
- used as an absolute tolerance: a block `i` and a temporarily
179
- fixed block 1 (the first block of the current trailing
180
- submatrix to be reduced) are considered to belong to the
181
- same cluster if their eigenvalues satisfy
182
-
183
- .. math:: | \\ lambda_1 - \\ lambda_i | <= tol.
184
-
185
- If the user sets `tol` < 0, then the given value of tol is
186
- used as a relative tolerance: a block i and a temporarily
187
- fixed block 1 are considered to belong to the same cluster
188
- if their eigenvalues satisfy, for ``j = 1, ..., n``
189
-
190
- .. math:: | \\ lambda_1 - \\ lambda_i | <= | tol | * \\ max | \\ lambda_j |.
191
-
192
- If the user sets `tol` = 0, then an implicitly computed,
193
- default tolerance, defined by ``tol = SQRT( SQRT( EPS ) )``
194
- is used instead, as a relative tolerance, where `EPS` is
195
- the machine precision (see LAPACK Library routine DLAMCH).
196
- If `sort` = 'N' or 'C', this parameter is not referenced.
140
+ n : int
141
+ The order of the matrices `A` and `X`. `n` >= 0.
142
+ A : (n, n) array_like
143
+ The matrix `A` to be block-diagonalized, in real Schur form.
144
+ X : (n, n) array_like, optional
145
+ A given matrix `X`, for accumulation of transformations (only if
146
+ `jobx`='U'). Default value is identity matrix of order `n`.
147
+ jobx : {'N', 'U'}, optional
148
+ Specifies whether or not the transformations are
149
+ accumulated, as follows:
150
+
151
+ := 'N': The transformations are not accumulated
152
+ := 'U': The transformations are accumulated in `Xr` (default)
153
+
154
+ sort : {'N', 'S', 'C', 'B'}, optional
155
+ Specifies whether or not the diagonal blocks of the real
156
+ Schur form are reordered, as follows:
157
+
158
+ := 'N': The diagonal blocks are not reordered (default);
159
+ := 'S': The diagonal blocks are reordered before each
160
+ step of reduction, so that clustered eigenvalues
161
+ appear in the same block;
162
+ := 'C': The diagonal blocks are not reordered, but the
163
+ "closest-neighbour" strategy is used instead of
164
+ the standard "closest to the mean" strategy
165
+ (see Notes_);
166
+ := 'B': The diagonal blocks are reordered before each
167
+ step of reduction, and the "closest-neighbour"
168
+ strategy is used (see Notes_).
169
+
170
+ pmax : float, optional
171
+ An upper bound for the infinity norm of elementary
172
+ submatrices of the individual transformations used for
173
+ reduction (see Notes_). `pmax` >= 1.0
174
+ tol : float, optional
175
+ The tolerance to be used in the ordering of the diagonal
176
+ blocks of the real Schur form matrix.
177
+ If the user sets `tol` > 0, then the given value of `tol` is
178
+ used as an absolute tolerance: a block `i` and a temporarily
179
+ fixed block 1 (the first block of the current trailing
180
+ submatrix to be reduced) are considered to belong to the
181
+ same cluster if their eigenvalues satisfy
182
+
183
+ .. math:: | \\ lambda_1 - \\ lambda_i | <= tol.
184
+
185
+ If the user sets `tol` < 0, then the given value of tol is
186
+ used as a relative tolerance: a block i and a temporarily
187
+ fixed block 1 are considered to belong to the same cluster
188
+ if their eigenvalues satisfy, for ``j = 1, ..., n``
189
+
190
+ .. math:: | \\ lambda_1 - \\ lambda_i | <= | tol | * \\ max | \\ lambda_j |.
191
+
192
+ If the user sets `tol` = 0, then an implicitly computed,
193
+ default tolerance, defined by ``tol = SQRT( SQRT( EPS ) )``
194
+ is used instead, as a relative tolerance, where `EPS` is
195
+ the machine precision (see LAPACK Library routine DLAMCH).
196
+ If `sort` = 'N' or 'C', this parameter is not referenced.
197
197
198
198
Returns
199
199
-------
200
- Ar : (n, n) ndarray
201
- Contains the computed block-diagonal matrix, in real Schur
202
- canonical form. The non-diagonal blocks are set to zero.
203
- Xr : (n, n) ndarray or None
204
- Contains the product of the given matrix `X` and the
205
- transformation matrix that reduced `A` to block-diagonal
206
- form. The transformation matrix is itself a product of
207
- non-orthogonal similarity transformations having elements
208
- with magnitude less than or equal to `pmax`.
209
- If `jobx` = 'N', this array is returned as None
210
- blsize : (n,) ndarray
211
- The orders of the resulting diagonal blocks of the matrix `Ar`.
212
- W : (n,) complex ndarray
213
- Contains the complex eigenvalues of the matrix `A`.
200
+ Ar : (n, n) ndarray
201
+ Contains the computed block-diagonal matrix, in real Schur
202
+ canonical form. The non-diagonal blocks are set to zero.
203
+ Xr : (n, n) ndarray or None
204
+ Contains the product of the given matrix `X` and the
205
+ transformation matrix that reduced `A` to block-diagonal
206
+ form. The transformation matrix is itself a product of
207
+ non-orthogonal similarity transformations having elements
208
+ with magnitude less than or equal to `pmax`.
209
+ If `jobx` = 'N', this array is returned as None
210
+ blsize : (n,) ndarray
211
+ The orders of the resulting diagonal blocks of the matrix `Ar`.
212
+ W : (n,) complex ndarray
213
+ Contains the complex eigenvalues of the matrix `A`.
214
214
215
215
Notes
216
216
-----
@@ -361,11 +361,9 @@ def mb03vd(n, ilo, ihi, A):
361
361
362
362
Parameters
363
363
----------
364
-
365
364
n : int
366
365
The order of the square matrices A_1, A_2, ..., A_p.
367
366
n >= 0.
368
-
369
367
ilo, ihi : int
370
368
It is assumed that all matrices A_j, j = 2, ..., p, are
371
369
already upper triangular in rows and columns [:ilo-1] and
@@ -375,15 +373,12 @@ def mb03vd(n, ilo, ihi, A):
375
373
If this is not the case, ilo and ihi should be set to 1
376
374
and n, respectively.
377
375
1 <= ilo <= max(1,n); min(ilo,n) <= ihi <= n.
378
-
379
376
A : ndarray
380
377
A[:n,:n,:p] must contain the matrices of factors to be reduced;
381
378
specifically, A[:,:,j-1] must contain A_j, j = 1, ..., p.
382
379
383
-
384
380
Returns
385
381
-------
386
-
387
382
HQ : ndarray
388
383
3D array with same shape as A. The upper triangle and the first
389
384
subdiagonal of HQ[:n,:n,0] contain the upper Hessenberg
@@ -396,16 +391,14 @@ def mb03vd(n, ilo, ihi, A):
396
391
below the diagonal, with the j-th column of the array TAU
397
392
represent the orthogonal matrix Q_j as a product of
398
393
elementary reflectors. See FURTHER COMMENTS.
399
-
400
394
Tau : ndarray
401
395
2D array with shape (max(1, n-1), p).
402
396
The leading n-1 elements in the j-th column contain the
403
397
scalar factors of the elementary reflectors used to form
404
398
the matrix Q_j, j = 1, ..., p. See FURTHER COMMENTS.
405
399
406
- Further Comments
407
- ----------------
408
-
400
+ Notes
401
+ -----
409
402
Each matrix Q_j is represented as a product of (ihi-ilo)
410
403
elementary reflectors,
411
404
@@ -478,38 +471,31 @@ def mb03vy(n, ilo, ihi, A, Tau, ldwork=None):
478
471
479
472
Parameters
480
473
----------
481
-
482
474
n : int
483
475
The order of the matrices Q_1, Q_2, ..., Q_p. N >= 0.
484
-
485
476
ilo, ihi : int
486
477
The values of the indices ilo and ihi, respectively, used
487
478
in the previous call of the SLICOT Library routine MB03VD.
488
479
1 <= ilo <= max(1,n); min(ilo,n) <= ihi <= n.
489
-
490
480
A : ndarray
491
481
A[:n,:n,j-1] must contain the vectors which define the
492
482
elementary reflectors used for reducing A_j, as returned
493
483
by SLICOT Library routine MB03VD, j = 1, ..., p.
494
-
495
484
Tau : ndarray
496
485
The leading N-1 elements in the j-th column must contain
497
486
the scalar factors of the elementary reflectors used to
498
487
form the matrix Q_j, as returned by SLICOT Library routine
499
488
MB03VD.
500
-
501
489
ldwork : int, optional
502
490
The length of the internal array DWORK. ldwork >= max(1, n).
503
491
For optimum performance ldwork should be larger.
504
492
505
493
506
494
Returns
507
495
-------
508
-
509
496
Q : ndarray
510
497
3D array with same shape as A. Q[:n,:n,j-1] contains the
511
498
N-by-N orthogonal matrix Q_j, j = 1, ..., p.
512
-
513
499
"""
514
500
515
501
hidden = ' (hidden by the wrapper)'
@@ -561,7 +547,7 @@ def mb03wd(job, compz, n, ilo, ihi, iloz, ihiz, H, Q, ldwork=None):
561
547
= 'E': Compute the eigenvalues only;
562
548
= 'S': Compute the factors T_1, ..., T_p of the full
563
549
Schur form, T = T_1*T_2*...*T_p.
564
- compz : {'N', 'I', 'V'}
550
+ compz : {'N', 'I', 'V'}
565
551
Indicates whether or not the user wishes to accumulate
566
552
the matrices Z_1, ..., Z_p, as follows:
567
553
= 'N': The matrices Z_1, ..., Z_p are not required;
@@ -776,9 +762,10 @@ def mb05nd(a, delta, tol=1e-7):
776
762
Square matrix
777
763
delta : float
778
764
The scalar value delta of the problem.
779
- tol : float
780
- Tolerance. A good value is sqrt(eps)
781
-
765
+ tol : float, optional
766
+ Tolerance. A good value is sqrt(eps).
767
+ Default is 1e-7.
768
+
782
769
Returns
783
770
-------
784
771
F : (n, n) ndarray
@@ -831,7 +818,6 @@ def mc01td(dico, dp, p):
831
818
832
819
= 'C': continuous-time case;
833
820
= 'D': discrete-time case.
834
-
835
821
dp : int
836
822
The degree of the polynomial `P(x)`. ``dp >= 0``.
837
823
p : (dp+1, ) array_like
0 commit comments