Skip to content

fix _isstatic() to use nstates==0 #790

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 16, 2022

Conversation

murrayrm
Copy link
Member

This PR fixes the issues identified in PR #785 regarding the way that StateSpace._isstatic was defining a static system. New version requires nstates == 0.

@coveralls
Copy link

coveralls commented Nov 13, 2022

Coverage Status

Coverage decreased (-0.002%) to 94.799% when pulling c82605b on murrayrm:fix_isstatic-12Nov2022 into b32e355 on python-control:main.

Copy link
Contributor

@roryyorke roryyorke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -51,7 +54,7 @@ class TSys:
def test_linear_iosys(self, tsys):
# Create an input/output system from the linear system
linsys = tsys.siso_linsys
iosys = ios.LinearIOSystem(linsys)
iosys = ios.LinearIOSystem(linsys).copy()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it obvious why this .copy is necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely not obvious, but this gets rid of a warning later on since the interconnect function generates a warning if a system appears more than once in an interconnected system, since then the name of system is not unique. (It's also possible to turn the warning off with warn_dupicate=False).

@sawyerbfuller sawyerbfuller merged commit 5180c7b into python-control:main Nov 16, 2022
@murrayrm murrayrm added this to the 0.9.3 milestone Dec 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants