Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Performance improvements to _remove_useless_states routine in statesp.py #248

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

Conversation

adm78
Copy link
Contributor

@adm78 adm78 commented Dec 12, 2018

  • avoid looping through states
  • significant performance improvement in the creation of large state space models

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 78.944% when pulling 394fa27 on adm78:statesp-performance-improvements into 4b0101c on python-control:master.

@coveralls
Copy link

coveralls commented Dec 12, 2018

Coverage Status

Coverage decreased (-13.1%) to 65.281% when pulling be53eb7 on adm78:statesp-performance-improvements into 31e6944 on python-control:master.

@adm78
Copy link
Contributor Author

adm78 commented Jan 20, 2019

Please let me know if you require any modifications to this PR. It would be great to get it merged into the master branch soon.

@repagh
Copy link
Member

repagh commented Mar 25, 2019

Is np.concatenate correct? You could end up with states that are removed for both reasons.
Maybe use np.union1d?
It seems to work now, but that relies on np.delete graciously accepting the indexes specified twice.

…tes method

This ensures that all elements in the array of state indices to be removed are unique.
@adm78
Copy link
Contributor Author

adm78 commented Mar 25, 2019

I'm not sure it's possible but I've replaced the np.concatenate with np.union1d just to be safe.

Looks like some of the tests are failing due to slycot import errors...

@murrayrm
Copy link
Member

Travis CI tests are fixed in PR #280. Will merge that into master and then ask pending PRs to merge the change so that we can be sure things are working.

@murrayrm murrayrm added this to the 0.8.2 milestone Apr 7, 2019
@murrayrm murrayrm merged commit 5d680f5 into python-control:master Apr 7, 2019
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