home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 1186949971 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

  • fbunt 3
  • dcherian 2

author_association 2

  • NONE 3
  • MEMBER 2

issue 1

  • Inverting Datasets or DataArrays with dask float data throws wrong ValueError instead of TypeError · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1085167329 https://github.com/pydata/xarray/issues/6427#issuecomment-1085167329 https://api.github.com/repos/pydata/xarray/issues/6427 IC_kwDOAMm_X85Arlbh fbunt 7178572 2022-03-31T21:59:57Z 2022-03-31T21:59:57Z NONE

Sorry for not explaining it very well initially

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Inverting Datasets or DataArrays with dask float data throws wrong ValueError instead of TypeError 1186949971
1085147507 https://github.com/pydata/xarray/issues/6427#issuecomment-1085147507 https://api.github.com/repos/pydata/xarray/issues/6427 IC_kwDOAMm_X85Arglz dcherian 2448579 2022-03-31T21:38:35Z 2022-03-31T21:38:35Z MEMBER

Ah thanks a lot for clarifying.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Inverting Datasets or DataArrays with dask float data throws wrong ValueError instead of TypeError 1186949971
1085141253 https://github.com/pydata/xarray/issues/6427#issuecomment-1085141253 https://api.github.com/repos/pydata/xarray/issues/6427 IC_kwDOAMm_X85ArfEF fbunt 7178572 2022-03-31T21:32:17Z 2022-03-31T21:32:17Z NONE

@dcherian I am aware that floats are invalid for inverting but that isn't the issue I'm raising. I think XArray should throw a TypeError for this case, like Numpy does. Currently it throws a ValueError indicating something is wrong with the variable dimensions. This is confusing and goes against the contract.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Inverting Datasets or DataArrays with dask float data throws wrong ValueError instead of TypeError 1186949971
1084932873 https://github.com/pydata/xarray/issues/6427#issuecomment-1084932873 https://api.github.com/repos/pydata/xarray/issues/6427 IC_kwDOAMm_X85AqsMJ dcherian 2448579 2022-03-31T18:02:14Z 2022-03-31T18:02:14Z MEMBER

Inverting is a boolean op so you'll need bool inputs. Note this doesn't work for numpy either ~np.array([1.0]). Convert to bool using astype first.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Inverting Datasets or DataArrays with dask float data throws wrong ValueError instead of TypeError 1186949971
1083600343 https://github.com/pydata/xarray/issues/6427#issuecomment-1083600343 https://api.github.com/repos/pydata/xarray/issues/6427 IC_kwDOAMm_X85Alm3X fbunt 7178572 2022-03-30T20:36:14Z 2022-03-30T20:42:48Z NONE

It looks like this happens because f(self.variable.data, ...) in DataArray._unary_op returns NotImplemented which the rest of the machinery doesn't know how to handle. Specifically dask.array.Array.__invert__ returns NotImplemented when the dtype is float.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Inverting Datasets or DataArrays with dask float data throws wrong ValueError instead of TypeError 1186949971

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