Skip to content

Commit 9664acf

Browse files
committed
remove unnecessary :role:, ~control. and `` from docstrings
1 parent bbfcfa3 commit 9664acf

42 files changed

Lines changed: 779 additions & 746 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

control/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# Creation date: 24 May 2009
55
# Use `git shortlog -n -s` for full list of contributors
66

7-
"""The Python Control Systems Library :mod:`control` provides common functions
8-
for analyzing and designing feedback control systems.
7+
"""The Python Control Systems Library (python-control) provides common
8+
functions for analyzing and designing feedback control systems.
99
1010
The initial goal for the package is to implement all of the
1111
functionality required to work through the examples in the textbook

control/bdalg.py

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
"""Block diagram algebra.
99
10-
The :mod:`control.bdalg` module contains some standard block diagram
11-
algebra, including series, parallel, and feedback functions.
10+
This module contains some standard block diagram algebra, including
11+
series, parallel, and feedback functions.
1212
1313
"""
1414

@@ -33,20 +33,20 @@ def series(*sys, **kwargs):
3333
3434
Parameters
3535
----------
36-
sys1, sys2, ..., sysn : scalar, array, or :class:`InputOutputSystem`
36+
sys1, sys2, ..., sysn : scalar, array, or `InputOutputSystem`
3737
I/O systems to combine.
3838
3939
Returns
4040
-------
41-
out : scalar, array, or :class:`InputOutputSystem`
41+
out : scalar, array, or `InputOutputSystem`
4242
Series interconnection of the systems.
4343
4444
Other Parameters
4545
----------------
4646
inputs, outputs : str, or list of str, optional
4747
List of strings that name the individual signals. If not given,
4848
signal names will be of the form `s[i]` (where `s` is one of `u`,
49-
or `y`). See :class:`InputOutputSystem` for more information.
49+
or `y`). See `InputOutputSystem` for more information.
5050
states : str, or list of str, optional
5151
List of names for system states. If not given, state names will be
5252
of of the form `x[i]` for interconnections of linear systems or
@@ -68,10 +68,9 @@ def series(*sys, **kwargs):
6868
Notes
6969
-----
7070
This function is a wrapper for the __mul__ function in the appropriate
71-
:class:`NonlinearIOSystem`, :class:`StateSpace`,
72-
:class:`TransferFunction`, or other I/O system class. The output type
73-
is the type of `sys1` unless a more general type is required based on
74-
type type of `sys2`.
71+
`NonlinearIOSystem`, `StateSpace`, `TransferFunction`, or other I/O
72+
system class. The output type is the type of `sys1` unless a more
73+
general type is required based on type type of `sys2`.
7574
7675
If both systems have a defined timebase (dt = 0 for continuous time,
7776
dt > 0 for discrete time), then the timebase for both systems must
@@ -105,20 +104,20 @@ def parallel(*sys, **kwargs):
105104
106105
Parameters
107106
----------
108-
sys1, sys2, ..., sysn : scalar, array, or :class:`InputOutputSystem`
107+
sys1, sys2, ..., sysn : scalar, array, or `InputOutputSystem`
109108
I/O systems to combine.
110109
111110
Returns
112111
-------
113-
out : scalar, array, or :class:`InputOutputSystem`
112+
out : scalar, array, or `InputOutputSystem`
114113
Parallel interconnection of the systems.
115114
116115
Other Parameters
117116
----------------
118117
inputs, outputs : str, or list of str, optional
119118
List of strings that name the individual signals. If not given,
120119
signal names will be of the form `s[i]` (where `s` is one of `u`,
121-
or `y`). See :class:`InputOutputSystem` for more information.
120+
or `y`). See `InputOutputSystem` for more information.
122121
states : str, or list of str, optional
123122
List of names for system states. If not given, state names will be
124123
of the form `x[i]` for interconnections of linear systems or
@@ -173,20 +172,20 @@ def negate(sys, **kwargs):
173172
174173
Parameters
175174
----------
176-
sys : scalar, array, or :class:`InputOutputSystem`
175+
sys : scalar, array, or `InputOutputSystem`
177176
I/O systems to negate.
178177
179178
Returns
180179
-------
181-
out : scalar, array, or :class:`InputOutputSystem`
180+
out : scalar, array, or `InputOutputSystem`
182181
Negated system.
183182
184183
Other Parameters
185184
----------------
186185
inputs, outputs : str, or list of str, optional
187186
List of strings that name the individual signals. If not given,
188187
signal names will be of the form `s[i]` (where `s` is one of `u`,
189-
or `y`). See :class:`InputOutputSystem` for more information.
188+
or `y`). See `InputOutputSystem` for more information.
190189
states : str, or list of str, optional
191190
List of names for system states. If not given, state names will be
192191
of of the form `x[i]` for interconnections of linear systems or
@@ -225,7 +224,7 @@ def feedback(sys1, sys2=1, sign=-1, **kwargs):
225224
226225
Parameters
227226
----------
228-
sys1, sys2 : scalar, array, or :class:`InputOutputSystem`
227+
sys1, sys2 : scalar, array, or `InputOutputSystem`
229228
I/O systems to combine.
230229
sign : scalar
231230
The sign of feedback. `sign` = -1 indicates negative feedback, and
@@ -234,15 +233,15 @@ def feedback(sys1, sys2=1, sign=-1, **kwargs):
234233
235234
Returns
236235
-------
237-
out : scalar, array, or :class:`InputOutputSystem`
236+
out : scalar, array, or `InputOutputSystem`
238237
Feedback interconnection of the systems.
239238
240239
Other Parameters
241240
----------------
242241
inputs, outputs : str, or list of str, optional
243242
List of strings that name the individual signals. If not given,
244243
signal names will be of the form `s[i]` (where `s` is one of `u`,
245-
or `y`). See :class:`InputOutputSystem` for more information.
244+
or `y`). See `InputOutputSystem` for more information.
246245
states : str, or list of str, optional
247246
List of names for system states. If not given, state names will be
248247
of of the form `x[i]` for interconnections of linear systems or
@@ -320,15 +319,22 @@ def append(*sys, **kwargs):
320319
321320
Parameters
322321
----------
323-
sys1, sys2, ..., sysn : scalar, array, or :class:`LTI`
322+
sys1, sys2, ..., sysn : scalar, array, or `LTI`
324323
I/O systems to combine.
325324
325+
Returns
326+
-------
327+
out : `LTI`
328+
Combined system, with input/output vectors consisting of all
329+
input/output vectors appended. Specific type returned is the type of
330+
the first argument.
331+
326332
Other Parameters
327333
----------------
328334
inputs, outputs : str, or list of str, optional
329335
List of strings that name the individual signals. If not given,
330336
signal names will be of the form `s[i]` (where `s` is one of `u`,
331-
or `y`). See :class:`InputOutputSystem` for more information.
337+
or `y`). See `InputOutputSystem` for more information.
332338
states : str, or list of str, optional
333339
List of names for system states. If not given, state names will be
334340
of of the form `x[i]` for interconnections of linear systems or
@@ -337,13 +343,6 @@ def append(*sys, **kwargs):
337343
System name (used for specifying signals). If unspecified, a generic
338344
name <sys[id]> is generated with a unique integer id.
339345
340-
Returns
341-
-------
342-
out : :class:`LTI`
343-
Combined system, with input/output vectors consisting of all
344-
input/output vectors appended. Specific type returned is the type of
345-
the first argument.
346-
347346
See Also
348347
--------
349348
interconnect, feedback, negate, parallel, series
@@ -374,7 +373,7 @@ def connect(sys, Q, inputv, outputv):
374373
375374
.. deprecated:: 0.10.0
376375
`connect` will be removed in a future version of python-control.
377-
Use :func:`interconnect` instead, which works with named signals.
376+
Use `interconnect` instead, which works with named signals.
378377
379378
The system `sys` is a system typically constructed with `append`, with
380379
multiple inputs and outputs. The inputs and outputs are connected
@@ -387,7 +386,7 @@ def connect(sys, Q, inputv, outputv):
387386
388387
Parameters
389388
----------
390-
sys : :class:`InputOutputSystem`
389+
sys : `InputOutputSystem`
391390
System to be connected.
392391
Q : 2D array
393392
Interconnection matrix. First column gives the input to be connected.
@@ -403,7 +402,7 @@ def connect(sys, Q, inputv, outputv):
403402
404403
Returns
405404
-------
406-
out : :class:`InputOutputSystem`
405+
out : `InputOutputSystem`
407406
Connected and trimmed I/O system.
408407
409408
See Also
@@ -412,8 +411,7 @@ def connect(sys, Q, inputv, outputv):
412411
413412
Notes
414413
-----
415-
The :func:`~control.interconnect` function in the :ref:`input/output
416-
systems <iosys-module>` module allows the use of named signals and
414+
The `interconnect` function allows the use of named signals and
417415
provides an alternative method for interconnecting multiple systems.
418416
419417
Examples
@@ -490,7 +488,7 @@ def combine_tf(tf_array, **kwargs):
490488
inputs, outputs : str, or list of str, optional
491489
List of strings that name the individual signals. If not given,
492490
signal names will be of the form `s[i]` (where `s` is one of `u`,
493-
or `y`). See :class:`InputOutputSystem` for more information.
491+
or `y`). See `InputOutputSystem` for more information.
494492
name : string, optional
495493
System name (used for specifying signals). If unspecified, a generic
496494
name <sys[id]> is generated with a unique integer id.
@@ -500,7 +498,7 @@ def combine_tf(tf_array, **kwargs):
500498
ValueError
501499
If timesteps of transfer functions do not match.
502500
ValueError
503-
If ``tf_array`` has incorrect dimensions.
501+
If `tf_array` has incorrect dimensions.
504502
ValueError
505503
If the transfer functions in a row have mismatched output or input
506504
dimensions.

control/config.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55

66
"""Functions to access default parameter values.
77
8-
The :mod:`control.config` module contains default values and utility
9-
functions for setting parameters that control the behavior of the
10-
control package.
8+
This module contains default values and utility functions for setting
9+
parameters that control the behavior of the control package.
1110
1211
"""
1312

control/ctrlplot.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
"""Utility functions for plotting.
66
7-
The :mod:`control.ctrlplot` module contains a collection of functions
8-
that are used by various plotting functions.
7+
This module contains a collection of functions that are used by
8+
various plotting functions.
99
1010
"""
1111

@@ -129,24 +129,24 @@ class ControlPlot(object):
129129
that the user might want to adjust, as well as providing methods to
130130
modify some of the properties of the plot.
131131
132-
A control figure consists of a :class:`matplotlib.figure.Figure` with
133-
an array of :class:`matplotlib.axes.Axes`. Each axes in the figure has
132+
A control figure consists of a `matplotlib.figure.Figure` with
133+
an array of `matplotlib.axes.Axes`. Each axes in the figure has
134134
a number of lines that represent the data for the plot. There may also
135135
be a legend present in one or more of the axes.
136136
137137
Attributes
138138
----------
139-
lines : array of list of :class:`matplotlib:Line2D`
139+
lines : array of list of `matplotlib:Line2D`
140140
Array of Line2D objects for each line in the plot. Generally, the
141141
shape of the array matches the subplots shape and the value of the
142142
array is a list of Line2D objects in that subplot. Some plotting
143143
functions will return variants of this structure, as described in
144144
the individual documentation for the functions.
145-
axes : 2D array of :class:`matplotlib:Axes`
145+
axes : 2D array of `matplotlib:Axes`
146146
Array of Axes objects for each subplot in the plot.
147-
figure : :class:`matplotlib:Figure`
147+
figure : `matplotlib:Figure`
148148
Figure on which the Axes are drawn.
149-
legend : :class:`matplotlib:.legend.Legend` (instance or ndarray)
149+
legend : `matplotlib:.legend.Legend` (instance or ndarray)
150150
Legend object(s) for the plot. If more than one legend is
151151
included, this will be an array with each entry being either None
152152
(for no legend) or a legend object.
@@ -182,7 +182,7 @@ def set_plot_title(self, title, frame='axes'):
182182
"""Set the title for a control plot.
183183
184184
This is a wrapper for the matplotlib `suptitle` function, but by
185-
setting ``frame`` to 'axes' (default) then the title is centered on
185+
setting `frame` to 'axes' (default) then the title is centered on
186186
the midpoint of the axes in the figure, rather than the center of
187187
the figure. This usually looks better (particularly with
188188
multi-panel plots), though it takes longer to render.
@@ -195,7 +195,7 @@ def set_plot_title(self, title, frame='axes'):
195195
Matplotlib figure. Defaults to current figure.
196196
frame : str, optional
197197
Coordinate frame to use for centering: 'axes' (default) or 'figure'.
198-
**kwargs : :func:`matplotlib.pyplot.suptitle` keywords, optional
198+
**kwargs : `matplotlib.pyplot.suptitle` keywords, optional
199199
Additional keywords (passed to matplotlib).
200200
201201
"""
@@ -214,7 +214,7 @@ def suptitle(
214214
"""Add a centered title to a figure.
215215
216216
.. deprecated:: 0.10.1
217-
Use :func:`ControlPlot.set_plot_title`.
217+
Use `ControlPlot.set_plot_title`.
218218
219219
"""
220220
warnings.warn(
@@ -229,7 +229,7 @@ def get_plot_axes(line_array):
229229
230230
.. deprecated:: 0.10.1
231231
This function will be removed in a future version of python-control.
232-
Use `cplt.axes` to obtain axes for an instance of :class:`ControlPlot`.
232+
Use `cplt.axes` to obtain axes for an instance of `ControlPlot`.
233233
234234
This function can be used to return the set of axes corresponding
235235
to the line array that is returned by `time_response_plot`. This
@@ -278,11 +278,11 @@ def pole_zero_subplots(
278278
Timebase for each subplot (or a list of timebases).
279279
scaling : 'auto', 'equal', or None
280280
Scaling to apply to the subplots.
281-
fig : :class:`matplotlib.figure.Figure`
281+
fig : `matplotlib.figure.Figure`
282282
Figure to use for creating subplots.
283283
rcParams : dict
284284
Override the default parameters used for generating plots.
285-
Default is set up config.default['ctrlplot.rcParams'].
285+
Default is set by config.defaults['ctrlplot.rcParams'].
286286
287287
Returns
288288
-------

0 commit comments

Comments
 (0)