home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where issue = 1094725752 and user = 10194086 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • mathause · 2 ✖

issue 1

  • dimensions: type as `str | Iterable[Hashable]`? · 2 ✖

author_association 1

  • MEMBER 2
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1007746043 https://github.com/pydata/xarray/issues/6142#issuecomment-1007746043 https://api.github.com/repos/pydata/xarray/issues/6142 IC_kwDOAMm_X848EPv7 mathause 10194086 2022-01-07T21:15:23Z 2022-01-07T21:15:23Z MEMBER

I agree this is confusing, what is meant here is to use a tuple as the name for one dimension. An example:

python ds = xr.Dataset({"x": ([("a", "b")], [1])}) print(ds) print(f"{ds.x.dims = }")

```python <xarray.Dataset> Dimensions: (('a', 'b'): 1) Dimensions without coordinates: ('a', 'b') Data variables: x (('a', 'b')) int64 1

ds.x.dims = (('a', 'b'),) ```


I found the issue again where we discussed that we want to keep dim: Hashable: #4821

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  dimensions: type as `str | Iterable[Hashable]`? 1094725752
1007250588 https://github.com/pydata/xarray/issues/6142#issuecomment-1007250588 https://api.github.com/repos/pydata/xarray/issues/6142 IC_kwDOAMm_X848CWyc mathause 10194086 2022-01-07T09:13:21Z 2022-01-07T09:13:21Z MEMBER

This will still work as two dims, since having str | Iterable[Hashable] rather than Hashable | Iterable[Hashable] means it will fail the first check. So if someone really wants a single dim as ("x", "y"), they can pass (("x", "y"),).

Yes, I think that is the gist of the proposal. I also think that it is quite elegant.

Does this mean that this would be confusion free?

I think it would be relatively unambiguous but not necessarily entirely confusion free for the user ("Why is the type of a single dim more restricted than of several dimensions?"). Maybe this warrants an entry in our FAQ or somewhere? Also we need to go over our code and update our typing and make sure stuff like xr.DataArray([1], dims=[("x", "y")] works as proposed here.

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  dimensions: type as `str | Iterable[Hashable]`? 1094725752

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