Skip to content

Commit 3a24b5a

Browse files
bnavigatorroryyorke
authored andcommitted
mc01td() docstring to numpydoc [skip ci]
(except first line for signature and no short summary)
1 parent 3fc8934 commit 3a24b5a

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

slycot/math.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -468,12 +468,6 @@ def mb05md(a, delta, balanc='N'):
468468
e.info = INFO
469469
raise e
470470

471-
"""
472-
from slycot import mb05nd
473-
import numpy as np
474-
a = np.mat('[-2. 0; 0.1 -3.]')
475-
mb05nd(a.shape[0], a, 0.1)
476-
"""
477471

478472
def mb05nd(a, delta, tol=1e-7):
479473
"""F, H = mb05nd(n, a, delta, tol=1e-7)
@@ -517,7 +511,7 @@ def mb05nd(a, delta, tol=1e-7):
517511

518512

519513
def mc01td(dico, dp, p):
520-
""" dp,stable,nz = mc01td(dico,dp,p)
514+
"""dp, stable, nz = mc01td(dico, dp, p)
521515
522516
To determine whether or not a given polynomial P(x) with real
523517
coefficients is stable, either in the continuous-time or discrete-
@@ -528,25 +522,31 @@ def mc01td(dico, dp, p):
528522
discrete-time case if all its zeros lie inside the unit circle.
529523
530524
531-
Required arguments:
532-
dico : input string(len=1)
533-
Indicates whether the stability test to be applied to P(x) is in
534-
the continuous-time or discrete-time case as follows:
525+
Parameters
526+
----------
527+
dico : {'C', 'D'}
528+
Indicates whether the stability test to be applied to `P(x)` is in
529+
the continuous-time or discrete-time case as follows::
530+
535531
= 'C': continuous-time case;
536532
= 'D': discrete-time case.
537-
dp : input int
538-
The degree of the polynomial P(x). dp >= 0.
539-
p : input rank-1 array('d') with bounds (dp + 1)
540-
This array must contain the coefficients of P(x) in increasing
541-
powers of x.
542-
Return objects:
533+
543534
dp : int
544-
If P(dp+1) = 0.0 on entry, then dp contains the index of the highest
545-
power of x for which P(dp+1) <> 0.0.
535+
The degree of the polynomial `P(x)`. ``dp >= 0``.
536+
p : (dp+1,) array_like
537+
This array must contain the coefficients of `P(x)` in increasing
538+
powers of `x`.
539+
540+
Returns
541+
-------
542+
dp : int
543+
If ``P(dp+1) = 0.0`` on entry, then `dp` contains the index of the
544+
highest power of `x` for which ``P(dp+1) <> 0.0``.
546545
stable : int
547-
Equal to 1 if P(x) if stable, 0 otherwise.
546+
Equal to 1 if `P(x)` is stable, 0 otherwise.
548547
nz : int
549548
The number of unstable zeros.
549+
550550
"""
551551
hidden = ' (hidden by the wrapper)'
552552
arg_list = ['dico', 'dp', 'P', 'stable', 'nz', 'DWORK' + hidden,

0 commit comments

Comments
 (0)