home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 275778443

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/issues/60#issuecomment-275778443 https://api.github.com/repos/pydata/xarray/issues/60 275778443 MDEyOklzc3VlQ29tbWVudDI3NTc3ODQ0Mw== 8982598 2017-01-27T21:24:31Z 2017-01-27T21:24:31Z CONTRIBUTOR

Just as I am interested in having this functionality, and the new apply_ufunc is available, would something along these lines suffice?

```python from wherever import argmax, take # numpy or dask

def gufunc_idxmax(x, y, axis=None): indx = argmax(x, axis) return take(y, indx)

def idxmax(obj, dim): sig = ([(dim,), (dim,)], [()]) kwargs = {'axis': -1} return apply_ufunc(gufunc_idxmin, obj, obj[dim], signature=sig, kwargs=kwargs, dask_array='allowed') ```

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