html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/pull/2766#issuecomment-464257620,https://api.github.com/repos/pydata/xarray/issues/2766,464257620,MDEyOklzc3VlQ29tbWVudDQ2NDI1NzYyMA==,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 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 > , or mute > the thread > > . > ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,409618015 https://github.com/pydata/xarray/pull/2766#issuecomment-464247609,https://api.github.com/repos/pydata/xarray/issues/2766,464247609,MDEyOklzc3VlQ29tbWVudDQ2NDI0NzYwOQ==,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}",,409618015 https://github.com/pydata/xarray/pull/2766#issuecomment-464186125,https://api.github.com/repos/pydata/xarray/issues/2766,464186125,MDEyOklzc3VlQ29tbWVudDQ2NDE4NjEyNQ==,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}",,409618015 https://github.com/pydata/xarray/pull/2766#issuecomment-463829789,https://api.github.com/repos/pydata/xarray/issues/2766,463829789,MDEyOklzc3VlQ29tbWVudDQ2MzgyOTc4OQ==,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](http://www.numpy.org/neps/nep-0018-array-function-protocol.html) 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}",,409618015