issues: 239918314
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
239918314 | MDExOlB1bGxSZXF1ZXN0MTI4NDcxOTk4 | 1469 | Argmin indexes | 6815844 | closed | 0 | 6 | 2017-07-01T01:23:31Z | 2020-06-29T19:36:25Z | 2020-06-29T19:36:25Z | MEMBER | 0 | pydata/xarray/pulls/1469 |
With this PR, ValueError raises if
Example: ```python In [1]: import xarray as xr ...: da = xr.DataArray([[1, 2], [-1, 40], [5, 6]], ...: [('x', ['c', 'b', 'a']), ('y', [1, 0])]) ...: ...: da.argmin_indexes() ...: Out[1]: OrderedDict([('x', <xarray.DataArray 'x' ()> array(1)), ('y', <xarray.DataArray 'y' ()> array(0))]) In [2]: da.argmin_indexes(dims='y') Out[2]: OrderedDict([('y', <xarray.DataArray 'y' (x: 3)> array([0, 0, 0]) Coordinates: * x (x) <U1 'c' 'b' 'a')]) ``` (Because the returned object is an Although in #1388
This is mainly because
1. For 1, I have prepared modification of For 2, we should either
+ change API of ```python In [2]: da.argmin_indexes(dims='y') Out[2]: OrderedDict([('y', array([0, 0, 0]), 'x', array(['c' 'b' 'a']))
I originally worked with the second option for the modification of Another alternertive is to
+ change API of Any comments are welcome. |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/1469/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
13221727 | pull |