home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where issue = 395994055 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 3

  • WeatherGod 4
  • shoyer 2
  • TomNicholas 1

author_association 2

  • CONTRIBUTOR 4
  • MEMBER 3

issue 1

  • getting a "truth value of an array" error when supplying my own `concat_dim`. · 7 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
451746014 https://github.com/pydata/xarray/issues/2647#issuecomment-451746014 https://api.github.com/repos/pydata/xarray/issues/2647 MDEyOklzc3VlQ29tbWVudDQ1MTc0NjAxNA== TomNicholas 35968931 2019-01-06T14:32:08Z 2019-01-06T14:32:08Z MEMBER

I just wanted to clarify that concat_dim=None very much does mean something special, it means "don't use concat on these datasets at all, just use merge". This is documented under the concat_dim argument description of the docs for auto_combine here.

Also @WeatherGod I think this bug was introduced by me in #2553, but should be checked again once #2616 is finished, because the API will change.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  getting a "truth value of an array" error when supplying my own `concat_dim`. 395994055
451504997 https://github.com/pydata/xarray/issues/2647#issuecomment-451504997 https://api.github.com/repos/pydata/xarray/issues/2647 MDEyOklzc3VlQ29tbWVudDQ1MTUwNDk5Nw== WeatherGod 291576 2019-01-04T17:06:50Z 2019-01-04T17:06:50Z CONTRIBUTOR

scratch that... the test was an or, not a and.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  getting a "truth value of an array" error when supplying my own `concat_dim`. 395994055
451504888 https://github.com/pydata/xarray/issues/2647#issuecomment-451504888 https://api.github.com/repos/pydata/xarray/issues/2647 MDEyOklzc3VlQ29tbWVudDQ1MTUwNDg4OA== shoyer 1217238 2019-01-04T17:06:30Z 2019-01-04T17:06:30Z MEMBER

I think concat_dim=None may mean something special here, which is why we have _CONCAT_DIM_DEFAULT

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  getting a "truth value of an array" error when supplying my own `concat_dim`. 395994055
451504462 https://github.com/pydata/xarray/issues/2647#issuecomment-451504462 https://api.github.com/repos/pydata/xarray/issues/2647 MDEyOklzc3VlQ29tbWVudDQ1MTUwNDQ2Mg== WeatherGod 291576 2019-01-04T17:05:00Z 2019-01-04T17:05:00Z CONTRIBUTOR

actually, we could simplify the conditional to be just concat_dim is _CONCAT_DIM_DEFAULT and not bother with the None test.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  getting a "truth value of an array" error when supplying my own `concat_dim`. 395994055
451504141 https://github.com/pydata/xarray/issues/2647#issuecomment-451504141 https://api.github.com/repos/pydata/xarray/issues/2647 MDEyOklzc3VlQ29tbWVudDQ1MTUwNDE0MQ== WeatherGod 291576 2019-01-04T17:03:54Z 2019-01-04T17:03:54Z CONTRIBUTOR

ah! that's why it snuck through! I have been raking my brain on this for the past hour! shall I go ahead and make a PR?

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  getting a "truth value of an array" error when supplying my own `concat_dim`. 395994055
451502294 https://github.com/pydata/xarray/issues/2647#issuecomment-451502294 https://api.github.com/repos/pydata/xarray/issues/2647 MDEyOklzc3VlQ29tbWVudDQ1MTUwMjI5NA== shoyer 1217238 2019-01-04T16:57:33Z 2019-01-04T16:57:33Z MEMBER

Indeed, this is should definitely be concat_dim is _CONCAT_DIM_DEFAULT for comparing to a sentinel value.

I think this snuck through because NumPy will automatically cast size 1 arrays (of any shape) to booleans :(. We should probably adapt that test to include an explicit dimension of size greater than 1.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  getting a "truth value of an array" error when supplying my own `concat_dim`. 395994055
451501740 https://github.com/pydata/xarray/issues/2647#issuecomment-451501740 https://api.github.com/repos/pydata/xarray/issues/2647 MDEyOklzc3VlQ29tbWVudDQ1MTUwMTc0MA== WeatherGod 291576 2019-01-04T16:55:40Z 2019-01-04T16:55:40Z CONTRIBUTOR

To be more explicit, the issue is that concat_dim == _CONCAT_DIM_DEFAULT is ill-advised because the type of concat_dim is not guaranteed to be a scalar. In fact, the elif of that area of code in api.py explicitly tests if concat_dim is or is not a list.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  getting a "truth value of an array" error when supplying my own `concat_dim`. 395994055

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