Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit10f009b

Browse files
committed
address@slivingston review comments
1 parentd459569 commit10f009b

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

‎control/ctrlplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def _make_legend_labels(labels, ignore_common=False):
103103
common_prefix=common_prefix[:last_space]
104104
prefix_len=len(common_prefix)
105105

106-
# Look for a commonsuffice (up to a space)
106+
# Look for a commonsuffix (up to a space)
107107
common_suffix=commonprefix(
108108
[label[::-1]forlabelinlabels])[::-1]
109109
suffix_len=len(common_suffix)

‎control/nlsys.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ def nlsys(
13171317

13181318

13191319
definput_output_response(
1320-
sysdata,T,U=0.,X0=0,params=None,ignore_errors=False,
1320+
sys,T,U=0.,X0=0,params=None,ignore_errors=False,
13211321
transpose=False,return_x=False,squeeze=None,
13221322
solve_ivp_kwargs=None,t_eval='T',**kwargs):
13231323
"""Compute the output response of a system to a given input.
@@ -1327,7 +1327,7 @@ def input_output_response(
13271327
13281328
Parameters
13291329
----------
1330-
sysdata :I/O systemor list ofI/O systems
1330+
sys :NonlinearIOSystemor list ofNonlinearIOSystem
13311331
I/O system(s) for which input/output response is simulated.
13321332
13331333
T : array-like
@@ -1449,16 +1449,14 @@ def input_output_response(
14491449
raiseTypeError("unrecognized keyword(s): ",str(kwargs))
14501450

14511451
# If passed a list, recursively call individual responses with given T
1452-
ifisinstance(sysdata, (list,tuple)):
1453-
responses= []
1452+
ifisinstance(sys, (list,tuple)):
1453+
sysdata,responses=sys, []
14541454
forsysinsysdata:
14551455
responses.append(input_output_response(
14561456
sys,T,U=U,X0=X0,params=params,transpose=transpose,
14571457
return_x=return_x,squeeze=squeeze,t_eval=t_eval,
14581458
solve_ivp_kwargs=solve_ivp_kwargs,**kwargs))
14591459
returnTimeResponseList(responses)
1460-
else:
1461-
sys=sysdata
14621460

14631461
# Sanity checking on the input
14641462
ifnotisinstance(sys,NonlinearIOSystem):

‎doc/conventions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ response from a non-zero initial condition.
157157
For linear time invariant (LTI) systems, the:func:`impulse_response`,
158158
:func:`initial_response`, and:func:`step_response` functions will
159159
automatically compute the time vector based on the poles and zeros of
160-
system. If a list of systems is passed, a common time vector will be
160+
thesystem. If a list of systems is passed, a common time vector will be
161161
computed and a list of responses will be returned in the form of a
162-
:class:`TimeResponseList` object. The:func:`force_response` function can
162+
:class:`TimeResponseList` object. The:func:`forced_response` function can
163163
also take a list of systems, to which a single common input is applied.
164164
The:class:`TimeResponseList` object has a `plot()` method that will plot
165-
each of thereponses in turn, using a sequence of different colors with
165+
each of theresponses in turn, using a sequence of different colors with
166166
appropriate titles and legends.
167167

168168
In addition the:func:`input_output_response` function, which handles

‎examples/plot_gallery.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# used to compare what things look like between different versions of the
77
# library. It is mainly intended for uses by developers to make sure there
88
# are no unexpected changes in plot formats, but also has some interest
9-
# examples ofhtings you can plot.
9+
# examples ofthings you can plot.
1010

1111
importos
1212
importsys
@@ -21,9 +21,10 @@
2121
savefigs='PYCONTROL_TEST_EXAMPLES'notinos.environ
2222
ifsavefigs:
2323
# Create a pdf file for storing the results
24+
importsubprocess
2425
frommatplotlib.backends.backend_pdfimportPdfPages
2526
fromdatetimeimportdate
26-
git_info=os.popen('gitdescribe').read().strip()
27+
git_info=subprocess.check_output(['git','describe'],text=True).strip()
2728
pdf=PdfPages(
2829
f'plot_gallery-{git_info}-{date.today().isoformat()}.pdf')
2930

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp