Title: Compatibility issue with SciPy 1.0 · Issue #164 · python-control/python-control · GitHub
Open Graph Title: Compatibility issue with SciPy 1.0 · Issue #164 · python-control/python-control
X Title: Compatibility issue with SciPy 1.0 · Issue #164 · python-control/python-control
Description: The following snippet import control as ctrl G = ctrl.tf(1, [1, 1]) t, y = ctrl.step_response(G) executed under Python 3.5.4 with SciPy 1.0, NumPy 1.13.3 and python-control 0.7 and SlyCot NOT installed fails to run. After investigation i...
Open Graph Description: The following snippet import control as ctrl G = ctrl.tf(1, [1, 1]) t, y = ctrl.step_response(G) executed under Python 3.5.4 with SciPy 1.0, NumPy 1.13.3 and python-control 0.7 and SlyCot NOT insta...
X Description: The following snippet import control as ctrl G = ctrl.tf(1, [1, 1]) t, y = ctrl.step_response(G) executed under Python 3.5.4 with SciPy 1.0, NumPy 1.13.3 and python-control 0.7 and SlyCot NOT insta...
Opengraph URL: https://github.com/python-control/python-control/issues/164
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Compatibility issue with SciPy 1.0","articleBody":"The following snippet\r\n\r\n```python\r\nimport control as ctrl\r\nG = ctrl.tf(1, [1, 1])\r\nt, y = ctrl.step_response(G)\r\n ```\r\n\r\nexecuted under Python 3.5.4 with **SciPy 1.0**, NumPy 1.13.3 and python-control 0.7 and **SlyCot NOT installed** fails to run.\r\n\r\nAfter investigation it turns out that the problem arrises in the file `statesp.py`, function `_convertToStateSpace` line 641: python-control tries to solve the problem using SlyCot. Since SlyCot is not found, it falls back to the `ImportError` handling in which the SciPy's `lti` is called:\r\n```python\r\n lti_sys = lti(squeeze(sys.num), squeeze(sys.den))\r\n return StateSpace(lti_sys.A, lti_sys.B, lti_sys.C, lti_sys.D,\r\n sys.dt)\r\n```\r\nIn SciyPy versions PRIOR to 1.0 the lti_sys object had the attributes A, B, C, D. However, in SciPy 1.0 these attributes have been removed. Hence, the code fails to execute.\r\n\r\nPossible workaround would be (runs using SciPy 0.19 and 1.0):\r\n```python\r\n from scipy.signal import tf2ss\r\n A, B, C, D = tf2ss(squeeze(sys.num), squeeze(sys.den))\r\n return StateSpace(A, B, C, D, sys.dt)\r\n```\r\n\r\nWhat do you think? Since many Windows user do not have Slycot available by default it would be nice to get this fixed.\r\n\r\nJan","author":{"url":"https://github.com/jcwinkler","@type":"Person","name":"jcwinkler"},"datePublished":"2017-11-15T11:02:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/164/python-control/issues/164"}
| 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:0c49c5b5-c824-94c8-b802-1c7d36498cb4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8D60:102625:1D267C:2912CF:697B3F6E |
| html-safe-nonce | ec17fb6235b1e3c7da3d292411525bd0d37ab7310efe1ae1904672cc34dfaf8e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDYwOjEwMjYyNToxRDI2N0M6MjkxMkNGOjY5N0IzRjZFIiwidmlzaXRvcl9pZCI6IjQ1Nzk2MDc0OTM1Nzg4MDEwMDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c7ad1c35154122e8900c142e3f47f181184bc3f5fad98722b10803297b2188d3 |
| hovercard-subject-tag | issue:274116086 |
| 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/164/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9e9079ec9363cae336f981ad8da15d4b175b7ec32b8e69097e8b37838de3d71a/python-control/python-control/issues/164 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9e9079ec9363cae336f981ad8da15d4b175b7ec32b8e69097e8b37838de3d71a/python-control/python-control/issues/164 |
| og:image:alt | The following snippet import control as ctrl G = ctrl.tf(1, [1, 1]) t, y = ctrl.step_response(G) executed under Python 3.5.4 with SciPy 1.0, NumPy 1.13.3 and python-control 0.7 and SlyCot NOT insta... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jcwinkler |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6fe64d94889230be19a900846cfc91707e7dd4206878d6c208922b46a6b0735d |
| 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 | 15736a47b83581130a149aa1b928696bea06adde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width