issue_comments: 482880911
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/pydata/xarray/issues/2891#issuecomment-482880911 | https://api.github.com/repos/pydata/xarray/issues/2891 | 482880911 | MDEyOklzc3VlQ29tbWVudDQ4Mjg4MDkxMQ== | 1217238 | 2019-04-13T20:30:51Z | 2019-04-13T20:30:51Z | MEMBER | As you've noticed, these arrays are "read only" because otherwise indexing can modify more than the original values, e.g., consider:
The work around is to call This is indeed intended behavior: by making the result read-only, we can expand dimensions without copying the original data, and without needing to worry about indexing modifying the wrong values. That said, we could certainly improve the usability of this feature in xarray. Some options:
- Mention the work-around of using |
{ "total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
432798510 |