issue_comments
14 rows where issue = 29136905 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: reactions, created_at (date), updated_at (date)
issue 1
- Implement DataArray.idxmax() · 14 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
598493015 | https://github.com/pydata/xarray/issues/60#issuecomment-598493015 | https://api.github.com/repos/pydata/xarray/issues/60 | MDEyOklzc3VlQ29tbWVudDU5ODQ5MzAxNQ== | shoyer 1217238 | 2020-03-13T00:43:48Z | 2020-03-13T00:43:48Z | MEMBER |
e.g., |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Implement DataArray.idxmax() 29136905 | |
598487450 | https://github.com/pydata/xarray/issues/60#issuecomment-598487450 | https://api.github.com/repos/pydata/xarray/issues/60 | MDEyOklzc3VlQ29tbWVudDU5ODQ4NzQ1MA== | mathause 10194086 | 2020-03-13T00:16:32Z | 2020-03-13T00:16:32Z | MEMBER | How would
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Implement DataArray.idxmax() 29136905 | |
532354509 | https://github.com/pydata/xarray/issues/60#issuecomment-532354509 | https://api.github.com/repos/pydata/xarray/issues/60 | MDEyOklzc3VlQ29tbWVudDUzMjM1NDUwOQ== | joemcglinchy 4762214 | 2019-09-17T18:54:40Z | 2019-09-17T18:54:40Z | NONE | I got around this with some (masked) numpy operations. perhaps it is useful? I was seeing the ``` test_arr is some array with some nodata value, and is of dims [channels, rows, columns]nodata = -32768 ma = np.ma.masked_equal(test_arr, nodata) use np.any to get a mask of rows/columns which have all masked entriesspec_axis = 0 all_na_mask = np.any(ma, axis=spec_axis) get the argmax across specified axisargm = np.argmax(test_arr, axis=spec_axis) argm = np.ma.masked_less(argm, -np.inf) argm.mask = ~all_na_mask ``` big piece here is modifying the mask directly and making sure that is correct. numpy docs advise against this approach but it seems to be giving me what I want. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Implement DataArray.idxmax() 29136905 | |
527576309 | https://github.com/pydata/xarray/issues/60#issuecomment-527576309 | https://api.github.com/repos/pydata/xarray/issues/60 | MDEyOklzc3VlQ29tbWVudDUyNzU3NjMwOQ== | HiperMaximus 45774781 | 2019-09-03T18:15:10Z | 2019-09-03T18:15:10Z | NONE | this is still very relevant |
{ "total_count": 1, "+1": 0, "-1": 0, "laugh": 1, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Implement DataArray.idxmax() 29136905 | |
457059732 | https://github.com/pydata/xarray/issues/60#issuecomment-457059732 | https://api.github.com/repos/pydata/xarray/issues/60 | MDEyOklzc3VlQ29tbWVudDQ1NzA1OTczMg== | shoyer 1217238 | 2019-01-24T04:05:17Z | 2019-01-24T04:05:17Z | MEMBER | This is still relevant |
{ "total_count": 5, "+1": 5, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Implement DataArray.idxmax() 29136905 | |
457052566 | https://github.com/pydata/xarray/issues/60#issuecomment-457052566 | https://api.github.com/repos/pydata/xarray/issues/60 | MDEyOklzc3VlQ29tbWVudDQ1NzA1MjU2Ng== | stale[bot] 26384082 | 2019-01-24T03:22:02Z | 2019-01-24T03:22:02Z | NONE | In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here; otherwise it will be marked as closed automatically |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Implement DataArray.idxmax() 29136905 | |
276543337 | https://github.com/pydata/xarray/issues/60#issuecomment-276543337 | https://api.github.com/repos/pydata/xarray/issues/60 | MDEyOklzc3VlQ29tbWVudDI3NjU0MzMzNw== | shoyer 1217238 | 2017-02-01T01:01:27Z | 2017-02-01T01:01:27Z | MEMBER |
Indeed,
Yes, ideally we would detect the dtype and find an appropriate fill or minimum value, similar to |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Implement DataArray.idxmax() 29136905 | |
276540506 | https://github.com/pydata/xarray/issues/60#issuecomment-276540506 | https://api.github.com/repos/pydata/xarray/issues/60 | MDEyOklzc3VlQ29tbWVudDI3NjU0MDUwNg== | jcmgray 8982598 | 2017-02-01T00:43:52Z | 2017-02-01T00:43:52Z | CONTRIBUTOR | Would using Ah yes true. I was slightly anticipating e.g. filling with NaT if the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Implement DataArray.idxmax() 29136905 | |
276538303 | https://github.com/pydata/xarray/issues/60#issuecomment-276538303 | https://api.github.com/repos/pydata/xarray/issues/60 | MDEyOklzc3VlQ29tbWVudDI3NjUzODMwMw== | shoyer 1217238 | 2017-02-01T00:30:32Z | 2017-02-01T00:30:32Z | MEMBER | Yes, that looks pretty reasonable. Two minor concerns:
- |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Implement DataArray.idxmax() 29136905 | |
276537615 | https://github.com/pydata/xarray/issues/60#issuecomment-276537615 | https://api.github.com/repos/pydata/xarray/issues/60 | MDEyOklzc3VlQ29tbWVudDI3NjUzNzYxNQ== | jcmgray 8982598 | 2017-02-01T00:26:24Z | 2017-02-01T00:26:24Z | CONTRIBUTOR | Ah yes both ways are working now, thanks. Just had a little play around with timings, and this seems like a reasonably quick way to achieve correct NaN behaviour: ```python def xr_idxmax(obj, dim): sig = ([(dim,), (dim,)], [()]) kwargs = {'axis': -1}
``` i.e. originally replace all NaN values with -Inf, use the usual |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Implement DataArray.idxmax() 29136905 | |
276235524 | https://github.com/pydata/xarray/issues/60#issuecomment-276235524 | https://api.github.com/repos/pydata/xarray/issues/60 | MDEyOklzc3VlQ29tbWVudDI3NjIzNTUyNA== | shoyer 1217238 | 2017-01-31T00:21:35Z | 2017-01-31T00:21:35Z | MEMBER |
I just merged #1237 -- see if it works with that.
Yeah, that's not a problem here, only for the
This behavior for nanargmax is unfortunate. The "right" behavior for xarray is probably to use |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Implement DataArray.idxmax() 29136905 | |
276232678 | https://github.com/pydata/xarray/issues/60#issuecomment-276232678 | https://api.github.com/repos/pydata/xarray/issues/60 | MDEyOklzc3VlQ29tbWVudDI3NjIzMjY3OA== | jcmgray 8982598 | 2017-01-31T00:06:02Z | 2017-01-31T00:06:02Z | CONTRIBUTOR | So I thought Regarding edge cases: multiple maxes is presumably fine as long as user is aware it just takes the first.
However, |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Implement DataArray.idxmax() 29136905 | |
275960531 | https://github.com/pydata/xarray/issues/60#issuecomment-275960531 | https://api.github.com/repos/pydata/xarray/issues/60 | MDEyOklzc3VlQ29tbWVudDI3NTk2MDUzMQ== | shoyer 1217238 | 2017-01-30T00:54:09Z | 2017-01-30T17:30:48Z | MEMBER | See http://stackoverflow.com/questions/40179593/how-to-get-the-coordinates-of-the-maximum-in-xarray for examples of how to do this with the current version of xarray. @MaximilianR's answer using @jcmgray Your proposal looks pretty close to me. But to handle higher dimension arrays, instead of I think something like the following would work: ```python def _index_from_1d_array(array, indices): return array[indices,] def gufunc_idxmax(x, y, axis=None): # note: y is always a numpy.ndarray, because IndexVariable objects # always have their data loaded into memory indx = argmax(x, axis) func = functools.partial(_index_from_1d_array, y)
``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Implement DataArray.idxmax() 29136905 | |
275778443 | https://github.com/pydata/xarray/issues/60#issuecomment-275778443 | https://api.github.com/repos/pydata/xarray/issues/60 | MDEyOklzc3VlQ29tbWVudDI3NTc3ODQ0Mw== | jcmgray 8982598 | 2017-01-27T21:24:31Z | 2017-01-27T21:24:31Z | CONTRIBUTOR | Just as I am interested in having this functionality, and the new ```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 } |
Implement DataArray.idxmax() 29136905 |
Advanced export
JSON shape: default, array, newline-delimited, object
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]);
user 6