home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

11 rows where author_association = "MEMBER" and issue = 409618015 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

  • max-sixty 5
  • shoyer 4
  • dcherian 2

issue 1

  • ENH - Adding Pseudo-Inverse to computation.py · 11 ✖

author_association 1

  • MEMBER · 11 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
482701467 https://github.com/pydata/xarray/pull/2766#issuecomment-482701467 https://api.github.com/repos/pydata/xarray/issues/2766 MDEyOklzc3VlQ29tbWVudDQ4MjcwMTQ2Nw== dcherian 2448579 2019-04-12T19:51:47Z 2019-04-12T19:51:47Z MEMBER

Since this is basically a one line call to apply_ufunc, I propose that we add it as an example of using apply_ufunc in the docs. Maybe even emphasize by adding a section on "wrapping numpy functions"?

@erbian can you change this PR to improve the documention this way?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH - Adding Pseudo-Inverse to computation.py 409618015
464282626 https://github.com/pydata/xarray/pull/2766#issuecomment-464282626 https://api.github.com/repos/pydata/xarray/issues/2766 MDEyOklzc3VlQ29tbWVudDQ2NDI4MjYyNg== max-sixty 5635139 2019-02-16T03:52:01Z 2019-02-16T03:52:01Z MEMBER

OK, thanks. Being able to call np.pinv(da, dim='x') would be awesome, but ack the downsides you outlined in the PEP

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH - Adding Pseudo-Inverse to computation.py 409618015
464257620 https://github.com/pydata/xarray/pull/2766#issuecomment-464257620 https://api.github.com/repos/pydata/xarray/issues/2766 MDEyOklzc3VlQ29tbWVudDQ2NDI1NzYyMA== shoyer 1217238 2019-02-16T00:14:28Z 2019-02-16T00:14:28Z MEMBER

Yes, we'll want to add our own wrapper functions. (Or possibly a new apply() method could do the dim -> axis renaming)

On Fri, Feb 15, 2019 at 4:01 PM Maximilian Roos notifications@github.com wrote:

Yes, np.pinv will raise if passed a dim kwargs. This was an intentional choice: http://www.numpy.org/neps/nep-0018-array-function-protocol.html#support-for-implementation-specific-arguments

Thanks.

With the current state, am I correct in thinking we still need wrappers for any numpy.linalg function that requires a dim kwarg? (I guess we could use the axis kwarg instead, but that might be confusing things)

— You are receiving this because you are on a team that was mentioned. Reply to this email directly, view it on GitHub https://github.com/pydata/xarray/pull/2766#issuecomment-464254541, or mute the thread https://github.com/notifications/unsubscribe-auth/ABKS1gNtPViHaVR_wyopKAktKCHgztfUks5vN0phgaJpZM4a4kfe .

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH - Adding Pseudo-Inverse to computation.py 409618015
464254541 https://github.com/pydata/xarray/pull/2766#issuecomment-464254541 https://api.github.com/repos/pydata/xarray/issues/2766 MDEyOklzc3VlQ29tbWVudDQ2NDI1NDU0MQ== max-sixty 5635139 2019-02-16T00:01:36Z 2019-02-16T00:01:36Z MEMBER

Yes, np.pinv will raise if passed a dim kwargs. This was an intentional choice: http://www.numpy.org/neps/nep-0018-array-function-protocol.html#support-for-implementation-specific-arguments

Thanks.

With the current state, am I correct in thinking we still need wrappers for any numpy.linalg function that requires a dim kwarg? (I guess we could use the axis kwarg instead, but that might be confusing things)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH - Adding Pseudo-Inverse to computation.py 409618015
464247609 https://github.com/pydata/xarray/pull/2766#issuecomment-464247609 https://api.github.com/repos/pydata/xarray/issues/2766 MDEyOklzc3VlQ29tbWVudDQ2NDI0NzYwOQ== shoyer 1217238 2019-02-15T23:36:05Z 2019-02-15T23:36:05Z MEMBER

Or would np.pinv raise if passed a dim kwarg? (if so, we'd still need to declare n wrappers, IIUC?)

Yes, np.pinv will raise if passed a dim kwargs. This was an intentional choice: http://www.numpy.org/neps/nep-0018-array-function-protocol.html#support-for-implementation-specific-arguments

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH - Adding Pseudo-Inverse to computation.py 409618015
464234058 https://github.com/pydata/xarray/pull/2766#issuecomment-464234058 https://api.github.com/repos/pydata/xarray/issues/2766 MDEyOklzc3VlQ29tbWVudDQ2NDIzNDA1OA== max-sixty 5635139 2019-02-15T22:48:33Z 2019-02-15T22:48:33Z MEMBER

No, that would give an error message about passing in a bad argument name. We'll need our own wrappers to switch axis to dim.

I understand we'd need to define __array_function__ on xarray objects managed the conversion.

Conditional on that, could someone call np.pinv(da, dim=['x', 'y']? And then DataArray.__array_function__ would receive the dim kwarg.

Or would np.pinv raise if passed a dim kwarg? (if so, we'd still need to declare n wrappers, IIUC?)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH - Adding Pseudo-Inverse to computation.py 409618015
464190301 https://github.com/pydata/xarray/pull/2766#issuecomment-464190301 https://api.github.com/repos/pydata/xarray/issues/2766 MDEyOklzc3VlQ29tbWVudDQ2NDE5MDMwMQ== dcherian 2448579 2019-02-15T20:36:12Z 2019-02-15T20:36:12Z MEMBER

Since this is basically a one line call to apply_ufunc, I propose that we add it as an example of using apply_ufunc in the docs. Maybe even emphasize by adding a section on "wrapping numpy functions"?

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH - Adding Pseudo-Inverse to computation.py 409618015
464186125 https://github.com/pydata/xarray/pull/2766#issuecomment-464186125 https://api.github.com/repos/pydata/xarray/issues/2766 MDEyOklzc3VlQ29tbWVudDQ2NDE4NjEyNQ== shoyer 1217238 2019-02-15T20:20:11Z 2019-02-15T20:20:11Z MEMBER

Reading the NEP, I think you could literally pass dim=['x','y'] to the numpy function, and it'll pass that onto xarray. Lmk if I'm mistaken.

No, that would give an error message about passing in a bad argument name. We'll need our own wrappers to switch axis to dim.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH - Adding Pseudo-Inverse to computation.py 409618015
464183807 https://github.com/pydata/xarray/pull/2766#issuecomment-464183807 https://api.github.com/repos/pydata/xarray/issues/2766 MDEyOklzc3VlQ29tbWVudDQ2NDE4MzgwNw== max-sixty 5635139 2019-02-15T20:11:38Z 2019-02-15T20:11:38Z MEMBER

Note that with NEP-18 we'll be able to directly everything in numpy.linalg on xarray objects, without requiring the use of a separate wrapper.

It would be awesome for those numpy functions to just work! Could we start on this now, making it conditional on numpy 1.16 installed?

Reading the NEP, I think you could literally pass dim=['x','y'] to the numpy function, and it'll pass that onto xarray. Lmk if I'm mistaken.

Speaking for @erbian (my colleague) , no rush to merge this - we thought it would be helpful but have it internally. Even better if we can get a general solution.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH - Adding Pseudo-Inverse to computation.py 409618015
463829789 https://github.com/pydata/xarray/pull/2766#issuecomment-463829789 https://api.github.com/repos/pydata/xarray/issues/2766 MDEyOklzc3VlQ29tbWVudDQ2MzgyOTc4OQ== shoyer 1217238 2019-02-14T22:34:04Z 2019-02-14T22:34:04Z MEMBER

It's not entirely clear to me where we should draw the line between included wrappers in xarray and leaving this to external packages, e.g., see xr-scipy.readthedocs.io

If we do include this in xarray, I would prefer to have both (1) a clear policy around what we include (e.g., only direct wrappers for numpy/scipy functions) and (2) a separate namespace for wrapped functions, e.g., xarray.linalg or something more generic like xarray.wrapped.

Note that with NEP-18 we'll be able to directly everything in numpy.linalg on xarray objects, without requiring the use of a separate wrapper.

cc @pydata/xarray for discussion

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH - Adding Pseudo-Inverse to computation.py 409618015
463719035 https://github.com/pydata/xarray/pull/2766#issuecomment-463719035 https://api.github.com/repos/pydata/xarray/issues/2766 MDEyOklzc3VlQ29tbWVudDQ2MzcxOTAzNQ== max-sixty 5635139 2019-02-14T17:36:36Z 2019-02-14T17:36:36Z MEMBER

Unfortunately this requires numpy 1.14. That's a year old - too soon to bump the minimum version?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH - Adding Pseudo-Inverse to computation.py 409618015

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