8000 Change InputOutputSystem repr to show type, name, inputs, and outputs · python-control/python-control@f06ef73 · GitHub
[go: up one dir, main page]

Skip to content

Commit f06ef73

Browse files
committed
DE26 Change InputOutputSystem repr to show type, name, inputs, and outputs
1 parent e8db508 commit f06ef73

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

control/iosys.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ def __init__(self, inputs=None, outputs=None, states=None, params={},
181181
nstates = 0
182182

183183
def __repr__(self):
184-
return self.name if self.name is not None else str(type(self))
184+
return f'<{self.__class__.__name__}:{self.name}:{list(self.input_index)}->{list(self.output_index)}>'
185+
185186

186187
def __str__(self):
187188
"""String representation of an input/output system"""

0 commit comments

Comments
 (0)
0