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/7427#issuecomment-1445221673,https://api.github.com/repos/pydata/xarray/issues/7427,1445221673,IC_kwDOAMm_X85WJFUp,14371165,2023-02-25T22:51:37Z,2023-02-25T22:51:37Z,MEMBER,"This one is failing on CI / ubuntu-latest py3.9 bare-minimum, is it taking a path without flox installed perhaps? ``` ___________ TestDataArrayGroupBy.test_groupby_fastpath_for_monotonic ___________ [gw2] linux -- Python 3.9.16 /home/runner/micromamba-root/envs/xarray-tests/bin/python self = def test_groupby_fastpath_for_monotonic(self): # Fixes https://github.com/pydata/xarray/issues/6220 index = [1, 2, 3, 4, 7, 9, 10] array = DataArray(np.arange(len(index)), [(""idx"", index)]) array_rev = array.copy().assign_coords({""idx"": index[::-1]}) fwd = array.groupby(""idx"", squeeze=False) rev = array_rev.groupby(""idx"", squeeze=False) for gb in [fwd, rev]: assert all([isinstance(elem, slice) for elem in gb._group_indices]) assert_identical(fwd.sum(), array) > assert_identical(rev.sum(), array_rev.sortby(""idx"")) E AssertionError: Left and right DataArray objects are not identical E E Differing values: E L E array([0, 1, 2, 3, 4, 5, 6]) E R E array([6, 5, 4, 3, 2, 1, 0]) E Differing coordinates: E L * idx (idx) int64 10 9 7 4 3 2 1 E R * idx (idx) int64 1 2 3 4 7 9 10 ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1523260646 https://github.com/pydata/xarray/pull/7427#issuecomment-1416740962,https://api.github.com/repos/pydata/xarray/issues/7427,1416740962,IC_kwDOAMm_X85UccBi,4671621,2023-02-04T12:34:39Z,2023-02-04T12:34:39Z,NONE,"Hi @dcherian, I added a note to whats-new. Thanks for your patience, still got a lot to learn :D","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1523260646 https://github.com/pydata/xarray/pull/7427#issuecomment-1412754874,https://api.github.com/repos/pydata/xarray/issues/7427,1412754874,IC_kwDOAMm_X85UNO26,4671621,2023-02-01T21:29:40Z,2023-02-01T21:29:40Z,NONE,"Hi @dcherian, I implemented the feedback as you described, hope this does the trick.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1523260646 https://github.com/pydata/xarray/pull/7427#issuecomment-1401009603,https://api.github.com/repos/pydata/xarray/issues/7427,1401009603,IC_kwDOAMm_X85TgbXD,2448579,2023-01-23T21:30:23Z,2023-01-23T21:30:23Z,MEMBER,"TO check the fastpath we'd want to both get the right answer and make sure that `_group_indices` is filled with slices: https://github.com/pydata/xarray/blob/4f3128bb7266d1a6fdeaf20718ea3f8286fe041e/xarray/core/groupby.py#L422-L430","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1523260646 https://github.com/pydata/xarray/pull/7427#issuecomment-1399055025,https://api.github.com/repos/pydata/xarray/issues/7427,1399055025,IC_kwDOAMm_X85TY-Kx,4671621,2023-01-20T23:06:28Z,2023-01-20T23:07:06Z,NONE,"Hi @dcherian that was so obvious that I missed it..My bad! I am not sure if I understand correctly what you are saying, but if I implement the test as you describe, would this not already work anyways? It will take the slow-path, but the behavior should be identical, right? My intention when writing the test was to explicitly test this case by supplying a grouper.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1523260646 https://github.com/pydata/xarray/pull/7427#issuecomment-1381060983,https://api.github.com/repos/pydata/xarray/issues/7427,1381060983,IC_kwDOAMm_X85SUVF3,2448579,2023-01-12T22:23:14Z,2023-01-12T22:23:47Z,MEMBER,"Thanks @JoelJaeschke! The intent was to change the code in `_unique_and_monotonic` [here](https://github.com/pydata/xarray/blob/4f3128bb7266d1a6fdeaf20718ea3f8286fe041e/xarray/core/groupby.py#L258) A good test would be make sure you get the same answer when grouping a DataArray of ones by a monotonically increasing variable (e.g. `[1, 1, 2, 2, 3, 3, 3]`) and the decreasing variable( e.g. `[3, 3, 3, 2, 2, 1, 1]`) ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1523260646