home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

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

  • monocongo 3
  • shoyer 2

author_association 2

  • NONE 3
  • MEMBER 2

issue 1

  • Error when applying a function with apply_ufunc() when using a function that returns multiple arrays · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
433789634 https://github.com/pydata/xarray/issues/2507#issuecomment-433789634 https://api.github.com/repos/pydata/xarray/issues/2507 MDEyOklzc3VlQ29tbWVudDQzMzc4OTYzNA== monocongo 1328158 2018-10-29T05:07:06Z 2018-10-29T05:07:06Z NONE

You're a wizard, Stephan. That was my bug. I really appreciate your help!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Error when applying a function with apply_ufunc() when using a function that returns multiple arrays 373646673
433779791 https://github.com/pydata/xarray/issues/2507#issuecomment-433779791 https://api.github.com/repos/pydata/xarray/issues/2507 MDEyOklzc3VlQ29tbWVudDQzMzc3OTc5MQ== shoyer 1217238 2018-10-29T03:43:49Z 2018-10-29T03:43:49Z MEMBER

Is xarray responsible for putting the arrays into a tuple upon function completion, and if so where should I go to look into that?

No, I don't think xarray is responsible for this. Depending on the options you pass to apply_ufunc ( e.g., vectorize=True) we may substitute a function for the provided func, but that's not the case by default.

I think this is the line in your function where you return a list: https://github.com/monocongo/climate_indices/blob/cd1982752e288cf02d50ca0680744842bde16293/climate_indices/palmer.py#L1937

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Error when applying a function with apply_ufunc() when using a function that returns multiple arrays 373646673
433768856 https://github.com/pydata/xarray/issues/2507#issuecomment-433768856 https://api.github.com/repos/pydata/xarray/issues/2507 MDEyOklzc3VlQ29tbWVudDQzMzc2ODg1Ng== monocongo 1328158 2018-10-29T02:20:30Z 2018-10-29T02:20:30Z NONE

Any guidance as to where I should start when looking into this further?

At this point, all I've been able to surmise is that the arrays returned by the applied function appear to be present, but are present as a list of arrays rather than as a tuple. That's where things go wonky in computation.py where it's checking for a tuple instance. Is xarray responsible for putting the arrays into a tuple upon function completion, and if so where should I go to look into that?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Error when applying a function with apply_ufunc() when using a function that returns multiple arrays 373646673
433458618 https://github.com/pydata/xarray/issues/2507#issuecomment-433458618 https://api.github.com/repos/pydata/xarray/issues/2507 MDEyOklzc3VlQ29tbWVudDQzMzQ1ODYxOA== monocongo 1328158 2018-10-26T16:03:26Z 2018-10-26T16:03:26Z NONE

Thanks, Stephan. I don't think this is related to numba, as I'm running this using the environment variable NUMBA_DISABLE_JIT=1 (I do this when debugging my code since numba JIT prevents stepping into and inspection of JIT annotated code since it's compiled). In any event, I can comment out the @numba.jit annotations and report any discrepancies.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Error when applying a function with apply_ufunc() when using a function that returns multiple arrays 373646673
433255707 https://github.com/pydata/xarray/issues/2507#issuecomment-433255707 https://api.github.com/repos/pydata/xarray/issues/2507 MDEyOklzc3VlQ29tbWVudDQzMzI1NTcwNw== shoyer 1217238 2018-10-26T01:21:14Z 2018-10-26T01:21:14Z MEMBER

I wonder if this is due to your use of @numba.jit on the applied functions -- does removing that fix this?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Error when applying a function with apply_ufunc() when using a function that returns multiple arrays 373646673

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