Skip to content

Commit af326ef

Browse files
fixup: Add missing labels when returning TimeResponseData
1 parent b58ad19 commit af326ef

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

control/timeresp.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,14 +1712,13 @@ def initial_response(sys, T=None, X0=0., input=0, output=None, T_num=None,
17121712
# Figure out if the system is SISO or not
17131713
issiso = sys.issiso() or (input is not None and output is not None)
17141714

1715-
# Select only the given input and output, if any
1716-
input_index = sys.input_index if input is None else {k: 0 for k, v in sys.input_index.items() if v == input}
1715+
# Select only the given output, if any
17171716
output_index = sys.output_index if output is None else {k: 0 for k, v in sys.output_index.items() if v == output}
17181717

17191718
# Store the response without an input
17201719
return TimeResponseData(
17211720
response.t, response.y, response.x, None, issiso=issiso,
1722-
output_labels=output_index, input_labels=input_index,
1721+
output_labels=output_index, input_labels=None,
17231722
state_labels=sys.state_index,
17241723
transpose=transpose, return_x=return_x, squeeze=squeeze)
17251724

0 commit comments

Comments
 (0)