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-649204113,https://api.github.com/repos/pydata/xarray/issues/3936,649204113,MDEyOklzc3VlQ29tbWVudDY0OTIwNDExMw==,1217238,2020-06-25T04:10:50Z,2020-06-25T04:10:50Z,MEMBER,"I'm going to wait a little while before merging in case anyone else has comment, but otherwise will merge in a day or two (definitely before the next release)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,594594646
https://github.com/pydata/xarray/pull/3936#issuecomment-617002459,https://api.github.com/repos/pydata/xarray/issues/3936,617002459,MDEyOklzc3VlQ29tbWVudDYxNzAwMjQ1OQ==,1217238,2020-04-21T07:23:11Z,2020-04-21T07:23:27Z,MEMBER,"I notice that some of your new deprecation warnings get issued when running your tests. Please silence these methods, e.g., using `pytest.mark.filterwarnings`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,594594646
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
https://github.com/pydata/xarray/pull/3936#issuecomment-610516784,https://api.github.com/repos/pydata/xarray/issues/3936,610516784,MDEyOklzc3VlQ29tbWVudDYxMDUxNjc4NA==,1217238,2020-04-07T17:23:24Z,2020-04-07T17:23:24Z,MEMBER,"Also, feel free to rewrite to avoid using inject_all_ops_and_reduce_methods() for argmin/argmax at all. Method injection is pretty hacky, and generally not worthwhile, e.g., see [this note](https://github.com/pydata/xarray/blob/c97e7998b69c5b41e863dfb0a43450491fb8de45/xarray/core/ops.py#L3) about removing it.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,594594646
https://github.com/pydata/xarray/pull/3936#issuecomment-609468040,https://api.github.com/repos/pydata/xarray/issues/3936,609468040,MDEyOklzc3VlQ29tbWVudDYwOTQ2ODA0MA==,1217238,2020-04-05T19:19:41Z,2020-04-05T19:19:41Z,MEMBER,"This looks really comprehensive, thank you!
Before doing a really careful review here, I'd like to try to work out the full API design we want. I'll write out some of my thoughts here, but your thoughts would also be very welcome!
Here's my summary of the current situation:
1. We have two pairs of methods, `argmin`/`argmax` and the new `idxmin`/`idxmax` for calculating integer positions or coordinate labels of the minimum/maximum along _one_ dimension.
2. We would like to have a way to do a similar calculation in multiple dimensions, which should return a dictionary of DataArray objects suitable for feeding into `isel`/`sel`.
This PR implements the multidimensional equivalent of `argmin`/`argmax`. It's fine to save the multidimensional equivalent of `idxmin`/`idxmax` for later, but we'll want to copy whatever design we pick here.
My first concern is about the name: it isn't obvious to me whether `indices_min` refers to integer positions or coordinate labels. I think a name based on `argmin`/`argmax` could help, e.g., perhaps `argmin_nd` or `argmin_dict`.
Another option would be to overload `argmin`/`argmax` to _also_ support return a dictionary, depending on the type of the arguments. If you pass a `list` of dimensions over which to calculate the min or max locations, you would get a dictionary back:
- `array.argmin('x')` would return a single `DataArray`
- `array.argmin(['x', 'y'])` would return a dict of `DataArray` objects with keys `{'x', 'y'}`
- `array.argmin(['x'])` would also return a dict `{'x': ...}`
I think I like this last option best but I would be curious what others think! @pydata/xarray any thoughts on this?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,594594646