home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where issue = 476103888 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • gwgundersen 4
  • max-sixty 3

author_association 2

  • CONTRIBUTOR 4
  • MEMBER 3

issue 1

  • DataArray.set_index throws error on documented input · 7 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
522350359 https://github.com/pydata/xarray/issues/3176#issuecomment-522350359 https://api.github.com/repos/pydata/xarray/issues/3176 MDEyOklzc3VlQ29tbWVudDUyMjM1MDM1OQ== max-sixty 5635139 2019-08-18T19:56:19Z 2019-08-18T19:56:19Z MEMBER

Good work on finding that issue. I think even if we can get something brief in, that would be helpful.

On the specific definitions:

What do you think of the terminology "alternative" or "auxiliary" dimension? a is clearly a dimension in the sense that it has coordinates or labels for all the "tick marks" along the x dimension.

For me 'dimension' has a precise definition from traditional sciences, so having our 'coordinate' be an additional / auxiliary / alternative dimension wouldn't be consistent with that (e.g. a 4-dimensional array would still be 4 dimensional regardless of how many coordinates it had).

At the very least, I'd love to add a lot more examples of how to actually use these things.

👍

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray.set_index throws error on documented input 476103888
522344162 https://github.com/pydata/xarray/issues/3176#issuecomment-522344162 https://api.github.com/repos/pydata/xarray/issues/3176 MDEyOklzc3VlQ29tbWVudDUyMjM0NDE2Mg== gwgundersen 2818208 2019-08-18T18:27:15Z 2019-08-18T18:27:15Z CONTRIBUTOR

Looks like the idea of a glossary is already being discussed in https://github.com/pydata/xarray/issues/2410.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray.set_index throws error on documented input 476103888
521980573 https://github.com/pydata/xarray/issues/3176#issuecomment-521980573 https://api.github.com/repos/pydata/xarray/issues/3176 MDEyOklzc3VlQ29tbWVudDUyMTk4MDU3Mw== gwgundersen 2818208 2019-08-16T11:39:56Z 2019-08-16T11:39:56Z CONTRIBUTOR

Thanks for these answers! On a related point, I'd be keen to open a PR for improved documentation for whatever object a is. It seems like the documented Xarray terminology is "multidimensional coordinate", right? To me, "non-index coordinate" and "multidimensional coordinate" are both pretty vague until you're more familiar with Xarray's way of thinking.

What do you think of the terminology "alternative" or "auxiliary" dimension? a is clearly a dimension in the sense that it has coordinates or labels for all the "tick marks" along the x dimension. At the very least, I'd love to add a lot more examples of how to actually use these things.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray.set_index throws error on documented input 476103888
521827695 https://github.com/pydata/xarray/issues/3176#issuecomment-521827695 https://api.github.com/repos/pydata/xarray/issues/3176 MDEyOklzc3VlQ29tbWVudDUyMTgyNzY5NQ== max-sixty 5635139 2019-08-15T23:06:48Z 2019-08-15T23:06:48Z MEMBER

Looking at this now, and I'm a little surprised at the verbiage. In your example, do you consider a to be a "variable"? I thought variables were individual DataArray objects "inside" Dataset objects. My colleagues and I have been referring to objects such as a as "alternative" or "auxiliary" dimensions. Basically, a different labeling of the same coordinates. You also seem to call these "multidimensional coordinates"?

You're not alone; the proliferation and overlap of terms can be confusing at the least. Maybe we should have a glossary somewhere. Briefly: - Dimensions are like x & y above (a is not a dimension) - Coordinates are labels along dimensions. These can be either index or non-index coordinates. a above is an non-index coordinate; x & y are indexes. Currently indexes are always named the same as their dimension. - (not 100% sure about this one, @pydata/xarray correct me where I'm wrong) Data Variables are indeed the objects inside a dataset. All the objects are Variables, including Coordinates.

But I do think I see the use case. The point is that you can take an existing dimension's coordinates and set them as the coordinates for an alternative dimension?

💯

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray.set_index throws error on documented input 476103888
521822644 https://github.com/pydata/xarray/issues/3176#issuecomment-521822644 https://api.github.com/repos/pydata/xarray/issues/3176 MDEyOklzc3VlQ29tbWVudDUyMTgyMjY0NA== gwgundersen 2818208 2019-08-15T22:42:07Z 2019-08-15T22:42:07Z CONTRIBUTOR

Looking at this now, and I'm a little surprised at the verbiage. In your example, do you consider a to be a "variable"? I thought variables were individual DataArray objects "inside" Dataset objects. My colleagues and I have been referring to objects such as a as "alternative" or "auxiliary" dimensions. Basically, a different labeling of the same coordinates. You also seem to call these "multidimensional coordinates"?

But I do think I see the use case. The point is that you can take an existing dimension's coordinates and set them as the coordinates for an alternative dimension?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray.set_index throws error on documented input 476103888
521554109 https://github.com/pydata/xarray/issues/3176#issuecomment-521554109 https://api.github.com/repos/pydata/xarray/issues/3176 MDEyOklzc3VlQ29tbWVudDUyMTU1NDEwOQ== gwgundersen 2818208 2019-08-15T08:05:39Z 2019-08-15T08:05:39Z CONTRIBUTOR

Thanks for the explanation. I'll create a PR and link to this issue this evening.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray.set_index throws error on documented input 476103888
518674048 https://github.com/pydata/xarray/issues/3176#issuecomment-518674048 https://api.github.com/repos/pydata/xarray/issues/3176 MDEyOklzc3VlQ29tbWVudDUxODY3NDA0OA== max-sixty 5635139 2019-08-06T13:40:28Z 2019-08-06T13:40:28Z MEMBER

Thanks for the issue @gwgundersen

I think the docs are potentially a bit unclear, and maybe the error message. The existing intention of set_index is to set existing variables as indexes, rather than creating new ones. For example, to extend your case:

```python

In [16]: arr = xr.DataArray(data=np.ones((2, 3)), dims=['x', 'y'], coords={'x': range(2), 'y': range(3), 'a': ('x', [3,4])})

In [17]: arr Out[17]: <xarray.DataArray (x: 2, y: 3)> array([[1., 1., 1.], [1., 1., 1.]]) Coordinates: * x (x) int64 0 1 * y (y) int64 0 1 2 a (x) int64 3 4

In [18]: arr.set_index(x='a') Out[18]: <xarray.DataArray (x: 2, y: 3)> array([[1., 1., 1.], [1., 1., 1.]]) Coordinates: * x (x) int64 3 4 * y (y) int64 0 1 2 ```

We'd definitely be keen on a PR improving the error message (i.e. something like 'a' is not the name of an existing variable), and v open to feedback on the docs & the method's functionality; let us know if you'd be interested in that PR.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray.set_index throws error on documented input 476103888

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 639.635ms · About: xarray-datasette