home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where issue = 1652227927 and user = 5821660 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

  • kmuehlbauer · 2 ✖

issue 1

  • `Variable/IndexVariable` do not accept a tuple for data. · 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
1527605739 https://github.com/pydata/xarray/issues/7713#issuecomment-1527605739 https://api.github.com/repos/pydata/xarray/issues/7713 IC_kwDOAMm_X85bDWnr kmuehlbauer 5821660 2023-04-28T13:55:17Z 2023-04-28T13:55:17Z MEMBER

The code is there since #867 by @shoyer which was committed almost 7 years ago.

I've no idea what's the purpose for packing tuples into 0d arrays but as there are also tests for it in the above PR I'm assuming there is one real reason. Maybe @shoyer can chime in here to shed some light?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `Variable/IndexVariable` do not accept a tuple for data. 1652227927
1525780533 https://github.com/pydata/xarray/issues/7713#issuecomment-1525780533 https://api.github.com/repos/pydata/xarray/issues/7713 IC_kwDOAMm_X85a8ZA1 kmuehlbauer 5821660 2023-04-27T14:17:26Z 2023-04-27T14:17:26Z MEMBER

@zoj613 Thanks for raising this.

The root-cause is that the tuple is returned from as_compatible_data as single element array:

python import xarray as xr print(xr.core.variable.as_compatible_data((2, 3, 4))) python array((2, 3, 4), dtype=object) This then breaks with the error you are seeing. I'm not quite sure if this is a bug in the code, a bug in the doc or no bug at all. But as a tuple is easily wrapped by np.array there should be a reason why Xarray is currently not able to digest tuples.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `Variable/IndexVariable` do not accept a tuple for data. 1652227927

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