home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 616998622

This data as json

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/3936#issuecomment-616998622 https://api.github.com/repos/pydata/xarray/issues/3936 616998622 MDEyOklzc3VlQ29tbWVudDYxNjk5ODYyMg== 1217238 2020-04-21T07:14:10Z 2020-04-21T07:14:10Z MEMBER

I eventually found that the cause of the errors I was getting was that the argmin and argmax methods did not have an out argument. In order for the methods to be wrapped by numpy (and I guess dask is the same), the call signature of np.argmin() has to be supported, which means axis and out arguments are needed.

I guess this would happen if somebody calls np.argmin(xarray_object)? Does this happen from inside xarray somewhere, or in external code?

If it's the former, then we should just fix xarray not to do this. If it's only in external code, I would still consider breaking this behavior.

The override mechanism that NumPy uses in argmin/argmax is really old/fragile, and it's not something we ever intended to support. There's no way we could write an argmin/argmax method with an incompatible signature that would work with these functions.

The better way to do overrides in NumPy is probably with __array_function__ now, but I'm not sure we want the trouble...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  594594646
Powered by Datasette · Queries took 160.827ms · About: xarray-datasette