Title: `InputOutputSystem.copy` makes shallow copies · Issue #728 · python-control/python-control · GitHub
Open Graph Title: `InputOutputSystem.copy` makes shallow copies · Issue #728 · python-control/python-control
X Title: `InputOutputSystem.copy` makes shallow copies · Issue #728 · python-control/python-control
Description: This is may be by design, but I found it unexpected (see below). If it is by design, it would help to add "shallow" to the doctring. In [220]: g = ct.rss() In [221]: g.D[0,0] Out[221]: -1.8274167505512213 In [222]: g2 = g.copy() In [223]...
Open Graph Description: This is may be by design, but I found it unexpected (see below). If it is by design, it would help to add "shallow" to the doctring. In [220]: g = ct.rss() In [221]: g.D[0,0] Out[221]: -1.827416750...
X Description: This is may be by design, but I found it unexpected (see below). If it is by design, it would help to add "shallow" to the doctring. In [220]: g = ct.rss() In [221]: g.D[0,0] Out[221]: -1...
Opengraph URL: https://github.com/python-control/python-control/issues/728
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`InputOutputSystem.copy` makes shallow copies","articleBody":"This is may be by design, but I found it unexpected (see below). If it *is* by design, it would help to add \"shallow\" to the doctring.\r\n\r\n```python\r\nIn [220]: g = ct.rss()\r\n\r\nIn [221]: g.D[0,0]\r\nOut[221]: -1.8274167505512213\r\n\r\nIn [222]: g2 = g.copy()\r\n\r\nIn [223]: g2.D[0,0] = 1\r\n\r\nIn [224]: g.D[0,0]\r\nOut[224]: 1.0\r\n```\r\n\r\nOne way to deep copy is to use `control.ss`; continuing from above:\r\n\r\n```\r\nIn [225]: g3 = ct.ss(g)\r\n\r\nIn [226]: g3.D[0,0] = 5\r\n\r\nIn [227]: g.D[0,0]\r\nOut[227]: 1.0\r\n```\r\n","author":{"url":"https://github.com/roryyorke","@type":"Person","name":"roryyorke"},"datePublished":"2022-04-24T07:29:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/728/python-control/issues/728"}
| 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:33529b01-fd25-b396-434d-385c40c03426 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C466:2A8A53:1BA563:26AF23:697B3F32 |
| html-safe-nonce | 85cdd161fe8ee206f944d2db0cdbbcd4d1428e981c38c7bd64ad0a7162f180e6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDY2OjJBOEE1MzoxQkE1NjM6MjZBRjIzOjY5N0IzRjMyIiwidmlzaXRvcl9pZCI6IjU3NDUyMjc3NjkwNzU5NDExNzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 29b1fc3803a54f543ab29160dbe667ab7e82df9cfd68f08563cd14a391f8d59a |
| hovercard-subject-tag | issue:1213573472 |
| 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/728/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7e82f93238a22ce8e096ec5b8cc829def39a06b38d9769b03e41297e72401b72/python-control/python-control/issues/728 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7e82f93238a22ce8e096ec5b8cc829def39a06b38d9769b03e41297e72401b72/python-control/python-control/issues/728 |
| og:image:alt | This is may be by design, but I found it unexpected (see below). If it is by design, it would help to add "shallow" to the doctring. In [220]: g = ct.rss() In [221]: g.D[0,0] Out[221]: -1.827416750... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | roryyorke |
| 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 | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width