★ wanayoo — archive 1999 https://github.com/python-control/python-control/issues/85Nouvelle recherche | Portail wanayoo
Skip to content
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

Avoid using inv when not necessary #85

Closed
cwrowley opened this issue Apr 19, 2016 · 1 comment
Closed

Avoid using inv when not necessary #85

cwrowley opened this issue Apr 19, 2016 · 1 comment
Labels

Comments

@cwrowley
Copy link
Contributor

@cwrowley cwrowley commented Apr 19, 2016

As pointed out by @pmli in #27, instead of computing matrix inverses, better to use np.linalg.solve when needed.

@cwrowley cwrowley added the quickfix label Apr 19, 2016
murrayrm added a commit that referenced this issue May 30, 2016
Addressing #84 and #85
@murrayrm
Copy link
Member

@murrayrm murrayrm commented May 30, 2016

Addressed in PR #91, now merged into master.

@murrayrm murrayrm closed this May 30, 2016
slivingston added a commit that referenced this issue Dec 31, 2016
#101

Changes are from branch `master` of
https://github.com/mp4096/python-control.git

There was merge conflict in how a for-loop was refactored into
`map` (here) vs. list comprehension (from PR #110).

I compared the two alternatives using %timeit of Jupyter for matrices
that would correspond to LTI systems with 10 state dimensions, 2
inputs, 2 outputs (so, the A matrix has shape (10, 10), B matrix has
shape (10,2), etc.), and with 100 state dimensions, 20 inputs,
20 outputs, all using matrices from numpy.random.random((r,c)).

The difference in timing performance does not appear
significant. However, the case of `map` was slightly faster
(approximately 500 to 900 ns less in duration), so I decided to use
that one to resolve the merge conflict.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.