Title: zero() returns error if there are no zeros and slycot is installed · Issue #218 · python-control/python-control · GitHub
Open Graph Title: zero() returns error if there are no zeros and slycot is installed · Issue #218 · python-control/python-control
X Title: zero() returns error if there are no zeros and slycot is installed · Issue #218 · python-control/python-control
Description: PR #205 added support for MIMO systems in the calculation of zeros for state space systems (using slycot), but there is a bug if there are no zeros in the input/output response. To generate the bug, use import control s = control.ss( con...
Open Graph Description: PR #205 added support for MIMO systems in the calculation of zeros for state space systems (using slycot), but there is a bug if there are no zeros in the input/output response. To generate the bug...
X Description: PR #205 added support for MIMO systems in the calculation of zeros for state space systems (using slycot), but there is a bug if there are no zeros in the input/output response. To generate the bug...
Opengraph URL: https://github.com/python-control/python-control/issues/218
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"zero() returns error if there are no zeros and slycot is installed","articleBody":"PR #205 added support for MIMO systems in the calculation of zeros for state space systems (using `slycot`), but there is a bug if there are no zeros in the input/output response.\r\n\r\nTo generate the bug, use\r\n```\r\nimport control\r\ns = control.ss( control.tf([1], [1, 2, 1]) )\r\ns.zero()\r\n```\r\nWithout `slycot`, we get\r\n```\r\narray([], dtype=float64)\r\n```\r\n\r\nWith `slycot` (0.3.3) this generates the following error trace:\r\n```\r\n~/src/python-control/murrayrm/control/statesp.py in zero(self)\r\n 526 self.A, self.B, self.C, self.D)\r\n 527 nu = out[0]\r\n--\u003e 528 return sp.linalg.eigvals(out[8][0:nu,0:nu], out[9][0:nu,0:nu])\r\n 529 except ImportError: # Slycot unavailable. Fall back to scipy.\r\n 530 if self.C.shape[0] != self.D.shape[1]:\r\n\r\n~/anaconda/envs/python3.6-slycot0.3.3/lib/python3.6/site-packages/scipy/linalg/decomp.py in eigvals(a, b, overwrite_a, check_finite, homogeneous_eigvals)\r\n 767 return eig(a, b=b, left=0, right=0, overwrite_a=overwrite_a,\r\n 768 check_finite=check_finite,\r\n--\u003e 769 homogeneous_eigvals=homogeneous_eigvals)\r\n 770 \r\n 771 \r\n\r\n~/anaconda/envs/python3.6-slycot0.3.3/lib/python3.6/site-packages/scipy/linalg/decomp.py in eig(a, b, left, right, overwrite_a, overwrite_b, check_finite, homogeneous_eigvals)\r\n 224 raise ValueError('a and b must have the same shape')\r\n 225 return _geneig(a1, b1, left, right, overwrite_a, overwrite_b,\r\n--\u003e 226 homogeneous_eigvals)\r\n 227 \r\n 228 geev, geev_lwork = get_lapack_funcs(('geev', 'geev_lwork'), (a1,))\r\n\r\n~/anaconda/envs/python3.6-slycot0.3.3/lib/python3.6/site-packages/scipy/linalg/decomp.py in _geneig(a1, b1, left, right, overwrite_a, overwrite_b, homogeneous_eigvals)\r\n 78 ggev, = get_lapack_funcs(('ggev',), (a1, b1))\r\n 79 cvl, cvr = left, right\r\n---\u003e 80 res = ggev(a1, b1, lwork=-1)\r\n 81 lwork = res[-2][0].real.astype(numpy.int)\r\n 82 if ggev.typecode in 'cz':\r\n\r\nValueError: failed to create intent(cache|hide)|optional array-- must have defined dimensions but got (0,)\r\n```\r\n","author":{"url":"https://github.com/murrayrm","@type":"Person","name":"murrayrm"},"datePublished":"2018-07-07T20:16:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/218/python-control/issues/218"}
| 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:e4df1d24-b1ef-241e-d514-e3df1d3398ce |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C0C6:5F470:C909A9:1192FA5:697B5AD3 |
| html-safe-nonce | 4bfeb2126af98f2f149a76fca8b258d5399d6a431d5a7aec837979bbaead601d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMEM2OjVGNDcwOkM5MDlBOToxMTkyRkE1OjY5N0I1QUQzIiwidmlzaXRvcl9pZCI6Ijc3ODExMjQ1Mzc0Nzg1MDMxMjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f0cdb6af8a2d9849192764bcf027c53bd12134b6cd25d00aeb53596570ccf8a1 |
| hovercard-subject-tag | issue:339171844 |
| 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/218/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9a82c90888db37e313b36e6c69e3bfc55bf38cb013aa8831e38a9dea657b2942/python-control/python-control/issues/218 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9a82c90888db37e313b36e6c69e3bfc55bf38cb013aa8831e38a9dea657b2942/python-control/python-control/issues/218 |
| og:image:alt | PR #205 added support for MIMO systems in the calculation of zeros for state space systems (using slycot), but there is a bug if there are no zeros in the input/output response. To generate the bug... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | murrayrm |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7eed3e20c41f6c464df945b1f353a52c450ca1653f4697d4ebcc58c2adc5868a |
| 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 | b059c4725f1b62cc8534bdab4092fd840e833907 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width