home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 873713013 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 3

  • keewis 2
  • max-sixty 1
  • darikg 1

author_association 2

  • MEMBER 3
  • CONTRIBUTOR 1

issue 1

  • Coord name not set when `concat`ing along a DataArray · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
830688362 https://github.com/pydata/xarray/issues/5240#issuecomment-830688362 https://api.github.com/repos/pydata/xarray/issues/5240 MDEyOklzc3VlQ29tbWVudDgzMDY4ODM2Mg== keewis 14808389 2021-05-01T20:15:56Z 2021-05-02T11:46:19Z MEMBER

The repr will be fixed by #5149, but we should probably still fix that. Since dim is the dimension to concatenate along I guess we should fall back to that (not sure though). Thoughts, @pydata/xarray?

For reference, the conversion happens in _calc_concat_dim_coord ("else"): https://github.com/pydata/xarray/blob/04acabb50bea9f48224464850ae5a918e57406e5/xarray/core/concat.py#L244-L265

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Coord name not set when `concat`ing along a DataArray 873713013
830713676 https://github.com/pydata/xarray/issues/5240#issuecomment-830713676 https://api.github.com/repos/pydata/xarray/issues/5240 MDEyOklzc3VlQ29tbWVudDgzMDcxMzY3Ng== max-sixty 5635139 2021-05-02T00:15:43Z 2021-05-02T00:15:43Z MEMBER

Agree that this should coerce to the name of the dim if the array has no name.

Technically should the kwarg of concat be coord rather than dim? I generally supply dim names there, rather than coords vars. (though I'm not suggesting we actually change it given the backward-compat).

Note that we already do this in the DataArray constructor:

```python

In [12]: a = xr.DataArray([0,1], coords=[xr.DataArray([1,2])], dims='b') # No name on the coord

In [13]: a Out[13]: <xarray.DataArray (b: 2)> array([0, 1]) Coordinates: * b (b) int64 1 2 # Yes name on the coord ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Coord name not set when `concat`ing along a DataArray 873713013
830685713 https://github.com/pydata/xarray/issues/5240#issuecomment-830685713 https://api.github.com/repos/pydata/xarray/issues/5240 MDEyOklzc3VlQ29tbWVudDgzMDY4NTcxMw== darikg 6875882 2021-05-01T19:55:01Z 2021-05-01T19:55:01Z CONTRIBUTOR

Thanks @keewis! I was confusing dimension names and variable names. I would support raising or falling back to a reasonably sane default -- the reason I stumbled on this was having a None coord name was breaking the _repr_html in Jupyter and causing a much more confusing error message

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Coord name not set when `concat`ing along a DataArray 873713013
830666545 https://github.com/pydata/xarray/issues/5240#issuecomment-830666545 https://api.github.com/repos/pydata/xarray/issues/5240 MDEyOklzc3VlQ29tbWVudDgzMDY2NjU0NQ== keewis 14808389 2021-05-01T17:32:57Z 2021-05-01T17:33:04Z MEMBER

would've expected the name of the new coordinate to be the name of the DataArray variable

that's exactly what it's doing: it uses the name of DataArray([0, 1], dims='b'), which is None. To fix that, you can assign a name to the DataArray: python In [3]: a = xr.DataArray([0], dims='a') ...: out = xr.concat([a, a], dim=xr.DataArray([0, 1], dims='b', name="x")) ...: out Out[3]: <xarray.DataArray (b: 2, a: 1)> array([[0], [0]]) Coordinates: x (b) int64 0 1 Dimensions without coordinates: b, a

Since None is not a particularly good name, we could raise for unnamed DataArray objects (not sure if falling back to dims for 1D DataArray objects would be a good idea)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Coord name not set when `concat`ing along a DataArray 873713013

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

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]);
Powered by Datasette · Queries took 16.311ms · About: xarray-datasette