home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 1478060173 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

  • anissa111 2
  • dcherian 1
  • slevang 1

author_association 3

  • NONE 2
  • CONTRIBUTOR 1
  • MEMBER 1

issue 1

  • `xr.where()` with numpy inputs produces error if global options changed · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1341826211 https://github.com/pydata/xarray/issues/7362#issuecomment-1341826211 https://api.github.com/repos/pydata/xarray/issues/7362 IC_kwDOAMm_X85P-qSj anissa111 38434768 2022-12-08T01:04:22Z 2022-12-08T01:04:22Z NONE

Great, thank you! We're actually planning to removing the set_options that triggered the edge case here in geocat-comp, but I still think the check in #7364 is useful and might save someone else (possibly me again 😆 ) in the future some trouble.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xr.where()` with numpy inputs produces error if global options changed 1478060173
1341818601 https://github.com/pydata/xarray/issues/7362#issuecomment-1341818601 https://api.github.com/repos/pydata/xarray/issues/7362 IC_kwDOAMm_X85P-obp slevang 39069044 2022-12-08T00:54:26Z 2022-12-08T00:54:26Z CONTRIBUTOR

So many edge cases and different ways to use this function! I'm also a bit surprised numpy-only inputs work here, but if it does, we may as well support it. #7364 would be an easy way to handle this case.

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xr.where()` with numpy inputs produces error if global options changed 1478060173
1340034181 https://github.com/pydata/xarray/issues/7362#issuecomment-1340034181 https://api.github.com/repos/pydata/xarray/issues/7362 IC_kwDOAMm_X85P30yF anissa111 38434768 2022-12-06T21:29:37Z 2022-12-06T21:29:37Z NONE

@dcherian That's a fair point. The function we wrote is supposed to support numpy and xarray input, and previously it was easier to use xr.where() for both cases instead of checking for input type repeatedly.

I just walked through my debugger with one of my failing tests and yes, it does appear that apply_ufunc is returning numpy output for all numpy input.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xr.where()` with numpy inputs produces error if global options changed 1478060173
1338829062 https://github.com/pydata/xarray/issues/7362#issuecomment-1338829062 https://api.github.com/repos/pydata/xarray/issues/7362 IC_kwDOAMm_X85PzOkG dcherian 2448579 2022-12-06T06:22:10Z 2022-12-06T06:22:10Z MEMBER

Thanks for the clear bug report!

b = xr.where(a < 5, a, b)

If the inputs are all numpy, you should be using np.where. We could raise a nicer error here.

But I'm not sure how it worked earlier. Des apply_ufunc return numpy output for all numpy inputs?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xr.where()` with numpy inputs produces error if global options changed 1478060173

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