home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 727623263 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • dcherian 3
  • keewis 2

issue 1

  • Dataset constructor with DataArray triggers computation · 5 ✖

author_association 1

  • MEMBER 5
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
715437186 https://github.com/pydata/xarray/issues/4529#issuecomment-715437186 https://api.github.com/repos/pydata/xarray/issues/4529 MDEyOklzc3VlQ29tbWVudDcxNTQzNzE4Ng== keewis 14808389 2020-10-23T16:12:49Z 2020-10-23T16:12:49Z MEMBER

I think it's OK to raise an error and ask the user to pass DataArray.data instead.

:+1:

as_variable is where the tuple is converted to a Variable, so that's where the check (or conversion) should go. I guess we should ask to change #4493?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset constructor with DataArray triggers computation 727623263
715369738 https://github.com/pydata/xarray/issues/4529#issuecomment-715369738 https://api.github.com/repos/pydata/xarray/issues/4529 MDEyOklzc3VlQ29tbWVudDcxNTM2OTczOA== dcherian 2448579 2020-10-23T14:15:52Z 2020-10-23T14:15:52Z MEMBER

ds2 = xr.Dataset(dict(a=(('x', 'y'), ds.a))

Thinking about this some more, maybe we should raise an error here. This syntax is a tuple of (dims, data, attrs, encoding); but DataArrays already have dims, attrs and encoding, so we'll need to deal with conflicts. I think it's OK to raise an error and ask the user to pass DataArray.data instead.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset constructor with DataArray triggers computation 727623263
714821638 https://github.com/pydata/xarray/issues/4529#issuecomment-714821638 https://api.github.com/repos/pydata/xarray/issues/4529 MDEyOklzc3VlQ29tbWVudDcxNDgyMTYzOA== dcherian 2448579 2020-10-22T23:45:56Z 2020-10-22T23:45:56Z MEMBER

It seems like we should extract DataArray.variable before we get to anything in variable.py (if we can)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset constructor with DataArray triggers computation 727623263
714801233 https://github.com/pydata/xarray/issues/4529#issuecomment-714801233 https://api.github.com/repos/pydata/xarray/issues/4529 MDEyOklzc3VlQ29tbWVudDcxNDgwMTIzMw== keewis 14808389 2020-10-22T22:38:52Z 2020-10-22T23:16:35Z MEMBER

I think this is a duplicate of #4483: xarray.core.variable.as_compatible_data doesn't have a special code path for DataArray and thus falls back to: https://github.com/pydata/xarray/blob/333e8dba55f0165ccadf18f2aaaee9257a4d716b/xarray/core/variable.py#L219 where DataArray.values will cast using numpy.asarray.

You should be able to work around that by using either xr.Dataset(dict(a=(('x', 'y'), ds.a.variable)) or xr.Dataset(dict(a=(('x', 'y'), ds.a.data))

4493 tries to fix this, but importing DataArray in as_compatible_data to avoid circular imports feels a bit unclean.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset constructor with DataArray triggers computation 727623263
714692097 https://github.com/pydata/xarray/issues/4529#issuecomment-714692097 https://api.github.com/repos/pydata/xarray/issues/4529 MDEyOklzc3VlQ29tbWVudDcxNDY5MjA5Nw== dcherian 2448579 2020-10-22T18:51:36Z 2020-10-22T18:51:36Z MEMBER

Looks like a bug to me.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset constructor with DataArray triggers computation 727623263

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