Skip to content

Commit ee1f019

Browse files
bnavigatorroryyorke
authored andcommitted
readd tolerance calculation docstring, reformat lzwork docstring
1 parent cf6c13e commit ee1f019

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

slycot/analysis.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -514,12 +514,21 @@ def ab08nz(n, m, p, A, B, C, D, equil='N', tol=0., lzwork=None):
514514
which is defined as the order of the largest leading (or trailing)
515515
triangular submatrix in the QR (or RQ) factorization with column
516516
(or row) pivoting whose estimated condition number is less than 1/tol.
517+
If tol is set to less than SQRT((N+P)*(N+M))*EPS
518+
then the tolerance is taken as SQRT((N+P)*(N+M))*EPS,
519+
where EPS is the machine precision (see LAPACK Library
520+
Routine DLAMCH).
517521
lzwork := None input int
518-
The length of the cache array zwork. The default value is calculated
519-
to MAX( 1, MIN(P,M) + MAX(3*M-1,N),
520-
MIN(P,N) + MAX(3*P-1,N+P,N+M),
521-
MIN(M,N) + MAX(3*M-1,N+M) )
522-
for optimum performance should be larger.
522+
The length of the internal cache array ZWORK. The default value is
523+
calculated to
524+
MAX( 1,
525+
MIN(P,M) + MAX(3*M-1,N),
526+
MIN(P,N) + MAX(3*P-1,N+P,N+M),
527+
MIN(M,N) + MAX(3*M-1,N+M) )
528+
For optimum performance lzwork should be larger.
529+
If lzwork = -1, then a workspace query is assumed;
530+
the routine only calculates the optimal size of the
531+
ZWORK array, and returns this value in lzwork_opt
523532
Return objects:
524533
nu : int
525534
The number of (finite) invariant zeros.
@@ -577,6 +586,7 @@ def ab08nz(n, m, p, A, B, C, D, equil='N', tol=0., lzwork=None):
577586
return (nu, rank, dinfz, nkror, nkrol, infz, kronr, kronl, Af, Bf,
578587
int(zwork[0].real))
579588

589+
580590
def ab09ad(dico,job,equil,n,m,p,A,B,C,nr=None,tol=0,ldwork=None):
581591
""" nr,Ar,Br,Cr,hsv = ab09ad(dico,job,equil,n,m,p,A,B,C,[nr,tol,ldwork])
582592

0 commit comments

Comments
 (0)