Title: _remove_useless_states() can change types to ndarrays · Issue #82 · python-control/python-control · GitHub
Open Graph Title: _remove_useless_states() can change types to ndarrays · Issue #82 · python-control/python-control
X Title: _remove_useless_states() can change types to ndarrays · Issue #82 · python-control/python-control
Description: It seems that if you enter the if statement here then it replaces self.A withself.A with zeros(1,1) which is of type ndarray. This will cause problems later as the library is taking advantage of the fact that * is matrix multiplication n...
Open Graph Description: It seems that if you enter the if statement here then it replaces self.A withself.A with zeros(1,1) which is of type ndarray. This will cause problems later as the library is taking advantage of th...
X Description: It seems that if you enter the if statement here then it replaces self.A withself.A with zeros(1,1) which is of type ndarray. This will cause problems later as the library is taking advantage of th...
Opengraph URL: https://github.com/python-control/python-control/issues/82
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"_remove_useless_states() can change types to ndarrays","articleBody":"It seems that if you enter the if statement [here](https://github.com/python-control/python-control/blob/master/control/statesp.py#L182-L186) then it replaces self.A with`self.A` with `zeros(1,1)` which is of type ndarray. This will cause problems later as the library is taking advantage of the fact that \\* is matrix multiplication not elementwise multiplcation as it would be for ndarrays. \n\nHere is an example of the problem\n\n``` python\nsys1 = control.StateSpace(0,0,0,0)\nsys2 = control.StateSpace(1,0,0,0)\nprint \"type(sys1.A)\", type(sys1.A)\nprint \"type(sys2.A)\", type(sys2.A)\n\n\ntype(sys1.A) \u003ctype 'numpy.ndarray'\u003e\ntype(sys2.A) \u003cclass 'numpy.matrixlib.defmatrix.matrix'\u003e\n```\n","author":{"url":"https://github.com/manuelli","@type":"Person","name":"manuelli"},"datePublished":"2016-04-07T00:51:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/82/python-control/issues/82"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ade8ea81-aa1a-8cf1-e880-66656698ee10 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C0B0:1B7326:3569342:472FEDB:697AF1A1 |
| html-safe-nonce | 5dcaed8661b060cc17ec66ab623289052c359ed52c8b56e9eb351a51a74d15c3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMEIwOjFCNzMyNjozNTY5MzQyOjQ3MkZFREI6Njk3QUYxQTEiLCJ2aXNpdG9yX2lkIjoiMTc3Njc5ODE1MjE2NjkyODgwMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | de2cad5d0925acf455a6ca2546a209fd4426a2a31ecf220001723aa4ad700855 |
| hovercard-subject-tag | issue:146476750 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-control/python-control/82/issue_layout |
| twitter:image | https://opengraph.githubassets.com/68a74cfc1f3aaac35c5dc1a0d146b7c593cb585b3d59e8627ced4491465ac24b/python-control/python-control/issues/82 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/68a74cfc1f3aaac35c5dc1a0d146b7c593cb585b3d59e8627ced4491465ac24b/python-control/python-control/issues/82 |
| og:image:alt | It seems that if you enter the if statement here then it replaces self.A withself.A with zeros(1,1) which is of type ndarray. This will cause problems later as the library is taking advantage of th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | manuelli |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7ce8ed0a54c4730aeca4e6abacfc6490365fc42e25480b86883054df3f9181c8 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-control/python-control git https://github.com/python-control/python-control.git |
| octolytics-dimension-user_id | 2285872 |
| octolytics-dimension-user_login | python-control |
| octolytics-dimension-repository_id | 22791752 |
| octolytics-dimension-repository_nwo | python-control/python-control |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 22791752 |
| octolytics-dimension-repository_network_root_nwo | python-control/python-control |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d7bfc78137af9a4828305e52ab993fce981d7085 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width