Title: Interconnect treats string as list · Issue #692 · python-control/python-control · GitHub
Open Graph Title: Interconnect treats string as list · Issue #692 · python-control/python-control
X Title: Interconnect treats string as list · Issue #692 · python-control/python-control
Description: If you pass the interconnect function a string instead of a list, it treats the string as a list (of characters). For example: P1 = ct.rss(2, 1, 1) P1_iosys = ct.LinearIOSystem(P1, inputs='u1', outputs='y1') P2 = ct.rss(2, 1, 1) P2_iosys...
Open Graph Description: If you pass the interconnect function a string instead of a list, it treats the string as a list (of characters). For example: P1 = ct.rss(2, 1, 1) P1_iosys = ct.LinearIOSystem(P1, inputs='u1', out...
X Description: If you pass the interconnect function a string instead of a list, it treats the string as a list (of characters). For example: P1 = ct.rss(2, 1, 1) P1_iosys = ct.LinearIOSystem(P1, inputs='u1...
Opengraph URL: https://github.com/python-control/python-control/issues/692
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Interconnect treats string as list","articleBody":"If you pass the `interconnect` function a string instead of a list, it treats the string as a list (of characters). For example:\r\n```\r\nP1 = ct.rss(2, 1, 1)\r\nP1_iosys = ct.LinearIOSystem(P1, inputs='u1', outputs='y1')\r\nP2 = ct.rss(2, 1, 1)\r\nP2_iosys = ct.LinearIOSystem(P2, inputs='y1', outputs='y2')\r\nP_series = ct.interconnect([P1_iosys, P2_iosys], inputs=['u1'], outputs=('y2'))\r\n```\r\ngenerates the following error:\r\n```\r\nValueError: could not find signal y\r\n\r\n```\r\nThe problem appears to be that `('y2')` is the same as `'y2'` in Python and is being interpreted as `['y', '2']`. Changing this to `outputs=('y2',)` or `outputs=['y2']` fixes the problem, but it is still a bug.\r\n","author":{"url":"https://github.com/murrayrm","@type":"Person","name":"murrayrm"},"datePublished":"2022-01-19T01:11:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/692/python-control/issues/692"}
| 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:7b4f9998-9552-3a38-2782-5b2c73e34e86 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A9B4:2EAD0:13DE849:1A8B746:697978DA |
| html-safe-nonce | 694345d4e5dcef8f5ed514161f1c3490baf86f5cb635000efb68da9ff1c3aa6b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOUI0OjJFQUQwOjEzREU4NDk6MUE4Qjc0Njo2OTc5NzhEQSIsInZpc2l0b3JfaWQiOiI4Nzc0NzY2NjM0NDUyMjIwMTIyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4ae9e1e03998f74d1e612ecc5b0b3d657132ed1ee5da9243f8cde427ab6c9069 |
| hovercard-subject-tag | issue:1107525743 |
| 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/692/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e83c33a57fbfa29415eb7a7173343364ccd546e75935d717b07948d6a7fc1aa2/python-control/python-control/issues/692 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e83c33a57fbfa29415eb7a7173343364ccd546e75935d717b07948d6a7fc1aa2/python-control/python-control/issues/692 |
| og:image:alt | If you pass the interconnect function a string instead of a list, it treats the string as a list (of characters). For example: P1 = ct.rss(2, 1, 1) P1_iosys = ct.LinearIOSystem(P1, inputs='u1', out... |
| 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 | c049b65ec7e54cbf2521f5a560b6527714c612b0bd169188e2ea6e16f83bd5f4 |
| 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 | 87b137883e35e2766c3d0f6a257c4044f6390b83 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width