issue_comments
6 rows where issue = 718716799 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: reactions, created_at (date), updated_at (date)
issue 1
- Scalar non-dimension coords forget their heritage · 6 ✖
| id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 708686170 | https://github.com/pydata/xarray/issues/4501#issuecomment-708686170 | https://api.github.com/repos/pydata/xarray/issues/4501 | MDEyOklzc3VlQ29tbWVudDcwODY4NjE3MA== | chrisroat 1053153 | 2020-10-14T22:07:38Z | 2020-10-14T22:07:38Z | CONTRIBUTOR | My mental model of what's happening may not be correct. I did want ``` import numpy as np import xarray as xr arr1 = xr.DataArray(np.zeros((1,5)), dims=['y', 'x'], coords={'e': ('y', [10])}) arr2 = arr1.isel(y=0).expand_dims('y') xr.testing.assert_identical(arr1, arr2) ``` ``` AssertionError: Left and right DataArray objects are not identical Differing coordinates: L e (y) int64 10 R e int64 10 ``` The non-dim coordinate Where it gets really interesting is in the following example where the non-dim coordinate moves from one dim to another. I understand the logic here (since the ``` import numpy as np import xarray as xr arr = xr.DataArray(np.zeros((2, 2, 5)), dims=['z', 'y', 'x'], coords={'e': ('y', [10, 20])}) print(arr.coords) print() arr0 = arr.isel(z=0,y=0) arr1 = arr.isel(z=1,y=1) arr_concat = xr.concat([arr0, arr1], 'z') print(arr_concat.coords) ``` ``` Coordinates: e (y) int64 10 20 Coordinates: e (z) int64 10 20 ``` |
{
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
Scalar non-dimension coords forget their heritage 718716799 | |
| 708588777 | https://github.com/pydata/xarray/issues/4501#issuecomment-708588777 | https://api.github.com/repos/pydata/xarray/issues/4501 | MDEyOklzc3VlQ29tbWVudDcwODU4ODc3Nw== | shoyer 1217238 | 2020-10-14T18:41:21Z | 2020-10-14T18:41:32Z | MEMBER | If we changed There's a bit of a conflict here between two desirable properties:
|
{
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
Scalar non-dimension coords forget their heritage 718716799 | |
| 708561579 | https://github.com/pydata/xarray/issues/4501#issuecomment-708561579 | https://api.github.com/repos/pydata/xarray/issues/4501 | MDEyOklzc3VlQ29tbWVudDcwODU2MTU3OQ== | chrisroat 1053153 | 2020-10-14T17:51:15Z | 2020-10-14T17:51:15Z | CONTRIBUTOR |
Ah, then that would be the desire here.
The suggestion here is that both of these would behave the same. The MCVE was just for the squeeze case, but I expect that |
{
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
Scalar non-dimension coords forget their heritage 718716799 | |
| 708167473 | https://github.com/pydata/xarray/issues/4501#issuecomment-708167473 | https://api.github.com/repos/pydata/xarray/issues/4501 | MDEyOklzc3VlQ29tbWVudDcwODE2NzQ3Mw== | shoyer 1217238 | 2020-10-14T05:33:59Z | 2020-10-14T05:33:59Z | MEMBER |
Thanks for clarifying! One problem with this -- at least for now -- is that xarray currently doesn't allow coordinates on DataArray objects to have dimensions that don't appear on the DataArray itself. It might also be surprising that this would make |
{
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
Scalar non-dimension coords forget their heritage 718716799 | |
| 706640485 | https://github.com/pydata/xarray/issues/4501#issuecomment-706640485 | https://api.github.com/repos/pydata/xarray/issues/4501 | MDEyOklzc3VlQ29tbWVudDcwNjY0MDQ4NQ== | chrisroat 1053153 | 2020-10-11T02:37:00Z | 2020-10-11T02:37:00Z | CONTRIBUTOR | I'm not a huge fan of adding arguments for a case that rarely comes up (I presume). One difference in your example is that the 'e' coord is never based on 'y', so I would not want it expanded -- so I'd still like that test to pass. The case I'm interested in is where the non-dimension coords are based on existing dimension coords that gets squeezed. So in this example: ``` import numpy as np import xarray as xr arr1 = xr.DataArray(np.zeros((1,5)), dims=['y', 'x'], coords={'y': [42], 'e': ('y', [10])}) arr1.squeeze() ``` The squeezed array looks like:
What I think would be more useful:
|
{
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
Scalar non-dimension coords forget their heritage 718716799 | |
| 706639713 | https://github.com/pydata/xarray/issues/4501#issuecomment-706639713 | https://api.github.com/repos/pydata/xarray/issues/4501 | MDEyOklzc3VlQ29tbWVudDcwNjYzOTcxMw== | shoyer 1217238 | 2020-10-11T02:26:42Z | 2020-10-11T02:26:42Z | MEMBER | Hi @chrisroat, thanks for the clear bug report! It indeed be nice if For example, this array does currently satisfy your desired property, but wouldn't if we made the change you request:
I suspect our best option for achieving this behavior would be to add another optional argument to |
{
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
Scalar non-dimension coords forget their heritage 718716799 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] (
[html_url] TEXT,
[issue_url] TEXT,
[id] INTEGER PRIMARY KEY,
[node_id] TEXT,
[user] INTEGER REFERENCES [users]([id]),
[created_at] TEXT,
[updated_at] TEXT,
[author_association] TEXT,
[body] TEXT,
[reactions] TEXT,
[performed_via_github_app] TEXT,
[issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
ON [issue_comments] ([user]);
user 2