issues
1 row where state = "closed", type = "issue" and user = 6355796 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date), closed_at (date)
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at ▲ | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
432798510 | MDU6SXNzdWU0MzI3OTg1MTA= | 2891 | expand_dims() modifies numpy.ndarray.flags to write only, upon manually reverting this flag back, attempting to set a single inner value using .loc will instead set all of the inner array values | davehemming 6355796 | closed | 0 | 6 | 2019-04-13T02:33:49Z | 2019-07-14T18:57:38Z | 2019-07-14T18:57:38Z | NONE | I am using the newly updated expand_dims API that was recently updated with this PR https://github.com/pydata/xarray/pull/2757. However the flag setting behaviour can also be observed using the old API syntax. ```python
Coordinates: * x (x) int64 0 1 2 * y (y) int64 0 1 2 Dimensions without coordinates: z
Coordinates: * x (x) int64 0 1 2 * y (y) int64 0 1 2 * z (z) int64 0 1 2
Coordinates: * x (x) int64 0 1 2 * y (y) int64 0 1 2 * z (z) int64 0 1 2 ``` Problem descriptionWhen applying the operation 'expand_dims({'z': 3}, -1)' on a DataArray the underlying Numpy array flags are changed. 'C_CONTIGUOUS' is set to False, and 'WRITEABLE' is set to False, and 'OWNDATA' is set to False. Upon changing 'WRITEABLE' back to True, when I try to set a single value in the DataArray using the '.loc' operator it will instead set all the values in that selected inner array. I am new to Xarray so I can't be entirely sure if this expected behaviour. Regardless I would expect that adding a new dimension to the array would not make that array 'read-only'. I would also not expect the '.loc' method to work differently to how it would otherwise. It's also not congruent with the Numpy 'expand_dims' operation. Because when I call the operation 'np.expand_dims(np_arr, axis=-1)' the 'C_CONTIGUOUS ' and 'WRITEABLE ' flags will not be modified. Expected OutputHere is a similar flow of operations that demonstrates the behaviour I would expect from the DataArray after applying 'expand_dims': ```python
Coordinates: * x (x) int64 0 1 2 * y (y) int64 0 1 2 Dimensions without coordinates: z
Coordinates: * x (x) int64 0 1 2 * y (y) int64 0 1 2 * z (z) int64 0 1 2
Coordinates: * x (x) int64 0 1 2 * y (y) int64 0 1 2 * z (z) int64 0 1 2 ``` Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/2891/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | xarray 13221727 | issue |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issues] ( [id] INTEGER PRIMARY KEY, [node_id] TEXT, [number] INTEGER, [title] TEXT, [user] INTEGER REFERENCES [users]([id]), [state] TEXT, [locked] INTEGER, [assignee] INTEGER REFERENCES [users]([id]), [milestone] INTEGER REFERENCES [milestones]([id]), [comments] INTEGER, [created_at] TEXT, [updated_at] TEXT, [closed_at] TEXT, [author_association] TEXT, [active_lock_reason] TEXT, [draft] INTEGER, [pull_request] TEXT, [body] TEXT, [reactions] TEXT, [performed_via_github_app] TEXT, [state_reason] TEXT, [repo] INTEGER REFERENCES [repos]([id]), [type] TEXT ); CREATE INDEX [idx_issues_repo] ON [issues] ([repo]); CREATE INDEX [idx_issues_milestone] ON [issues] ([milestone]); CREATE INDEX [idx_issues_assignee] ON [issues] ([assignee]); CREATE INDEX [idx_issues_user] ON [issues] ([user]);