Title: Convert TransferFunction's shallow copy to deep copy. · Issue #130 · python-control/python-control · GitHub
Open Graph Title: Convert TransferFunction's shallow copy to deep copy. · Issue #130 · python-control/python-control
X Title: Convert TransferFunction's shallow copy to deep copy. · Issue #130 · python-control/python-control
Description: I spent quite a bit of time trying to debug an error and finally stumbled on the documentation: # Beware: this is a shallow copy! This should be okay, # but be careful. It took me a bit of digging and debugging before I realized my error...
Open Graph Description: I spent quite a bit of time trying to debug an error and finally stumbled on the documentation: # Beware: this is a shallow copy! This should be okay, # but be careful. It took me a bit of digging ...
X Description: I spent quite a bit of time trying to debug an error and finally stumbled on the documentation: # Beware: this is a shallow copy! This should be okay, # but be careful. It took me a bit of digging ...
Opengraph URL: https://github.com/python-control/python-control/issues/130
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Convert TransferFunction's shallow copy to deep copy.","articleBody":"I spent quite a bit of time trying to debug an error and finally stumbled on the documentation:\r\n\r\n # Beware: this is a shallow copy! This should be okay,\r\n # but be careful.\r\n\r\nIt took me a bit of digging and debugging before I realized my errors caused by the shallow copy:\r\n\r\n \u003e\u003e\u003e print(num)\r\n \u003e\u003e\u003e print(type(num[0]))\r\n\r\n [[1], [2]]\r\n \u003cclass 'list'\u003e\r\n\r\n \u003e\u003e\u003e sys1 = control.TransferFunction([num],[den])\r\n \u003e\u003e\u003e sys1\r\n\r\n \u003e\u003e\u003e print(num)\r\n \u003e\u003e\u003e print(type(num[0]))\r\n\r\n [array([1]), array([2])]\r\n \u003cclass 'numpy.ndarray'\u003e\r\n\r\nThis can make scripts behave different based on the order of operation:\r\n\r\n num = ...\r\n den = ...\r\n myfunc(num)\r\n TransferFunction(num, den)\r\n\r\nvs.\r\n\r\n num = ...\r\n den = ...\r\n TransferFunction(num, den)\r\n myfunc(num)\r\n\r\nTo new Python users having the variables 'num' \u0026 'den' behave different before and after calling ``TransferFunction`` can be confusing and off-putting. ","author":{"url":"https://github.com/dapperfu","@type":"Person","name":"dapperfu"},"datePublished":"2017-02-09T16:54:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/130/python-control/issues/130"}
| 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:ef750cc3-4e0d-71e7-6c55-2884f7735388 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A92A:169132:1C971D:27C46B:697B3F64 |
| html-safe-nonce | 8c6f5441cbbabaa7458821ea9b95d03de358b4937801bff9c3be607c13fec2b8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTJBOjE2OTEzMjoxQzk3MUQ6MjdDNDZCOjY5N0IzRjY0IiwidmlzaXRvcl9pZCI6IjY2NjE0NTc0NjE0MDYwMjM1MjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ccee19bdeec7c319852b19bcc6a2bdf6554d34679584f063599a00eb1b025617 |
| hovercard-subject-tag | issue:206562855 |
| 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/130/issue_layout |
| twitter:image | https://opengraph.githubassets.com/83eeb26aaeabb5a4c4db98c864a1112312d9cdec4c6255f2467831b2f49c20bf/python-control/python-control/issues/130 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/83eeb26aaeabb5a4c4db98c864a1112312d9cdec4c6255f2467831b2f49c20bf/python-control/python-control/issues/130 |
| og:image:alt | I spent quite a bit of time trying to debug an error and finally stumbled on the documentation: # Beware: this is a shallow copy! This should be okay, # but be careful. It took me a bit of digging ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dapperfu |
| 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