Title: implement copy on write · Issue #597 · larray-project/larray · GitHub
Open Graph Title: implement copy on write · Issue #597 · larray-project/larray
X Title: implement copy on write · Issue #597 · larray-project/larray
Description: In python, using b = a does not copy the content of a. >>> a = ndtest(3) >>> b = a >>> b['a1'] = 0 >>> a['a1'] 0 The solution is to use b = a.copy() but if users use it everywhere even when not strictly necessary (and determining this is...
Open Graph Description: In python, using b = a does not copy the content of a. >>> a = ndtest(3) >>> b = a >>> b['a1'] = 0 >>> a['a1'] 0 The solution is to use b = a.copy() but if users use it everywhere even when not str...
X Description: In python, using b = a does not copy the content of a. >>> a = ndtest(3) >>> b = a >>> b['a1'] = 0 >>> a['a1'] 0 The solution is to use b = a.cop...
Opengraph URL: https://github.com/larray-project/larray/issues/597
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"implement copy on write","articleBody":"In python, using b = a does not copy the content of a.\r\n```python\r\n>>> a = ndtest(3)\r\n>>> b = a\r\n>>> b['a1'] = 0\r\n>>> a['a1']\r\n0\r\n```\r\nThe solution is to use b = a.copy() but if users use it everywhere even when not strictly necessary (and determining this is not always obvious) would consume memory and cpu needlessly. \r\n\r\nTo eliminate this problem, it would not be too hard to tell users to always use .copy() but in .copy() only flag the resulting array as \"must_copy_on_write\", without actually copying the data right away. Then if (**and only if**) the user later modifies the copy (using setitem), an actual copy is made and the array is flagged as must_copy_on_write=False before the setitem is done.","author":{"url":"https://github.com/gdementen","@type":"Person","name":"gdementen"},"datePublished":"2018-03-01T13:36:23Z","url":"https://github.com/larray-project/larray/issues/597"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:f49a8098-f316-d9ae-d205-8fe53996fdf4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E098:3F7946:200D8EF:2B9913D:6B001F50 |
| html-safe-nonce | 920ee0eea6d404acafe0746fc30044bc2ede77325e9a744e20f3692da8d923c7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDk4OjNGNzk0NjoyMDBEOEVGOjJCOTkxM0Q6NkIwMDFGNTAiLCJ2aXNpdG9yX2lkIjoiMjIwNTQxMzM1MjYzOTgzMTg4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 59c893dbd6a1ec44bb6539ad2a0248be604b4e0785bc890907f4f3721b65c746 |
| hovercard-subject-tag | issue:301406527 |
| 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/larray-project/larray/597/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8f50a8e26735c87c776048820b477916cc0ad2e7d87b31da8e2cfc779f2019c7/larray-project/larray/issues/597 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8f50a8e26735c87c776048820b477916cc0ad2e7d87b31da8e2cfc779f2019c7/larray-project/larray/issues/597 |
| og:image:alt | In python, using b = a does not copy the content of a. >>> a = ndtest(3) >>> b = a >>> b['a1'] = 0 >>> a['a1'] 0 The solution is to use b = a.copy() but if users use it everywhere even when not str... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gdementen |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| turbo-cache-control | no-preview |
| go-import | github.com/larray-project/larray git https://github.com/larray-project/larray.git |
| octolytics-dimension-user_id | 26460981 |
| octolytics-dimension-user_login | larray-project |
| octolytics-dimension-repository_id | 16981067 |
| octolytics-dimension-repository_nwo | larray-project/larray |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16981067 |
| octolytics-dimension-repository_network_root_nwo | larray-project/larray |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width