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/7798#issuecomment-1529130077,https://api.github.com/repos/pydata/xarray/issues/7798,1529130077,IC_kwDOAMm_X85bJKxd,6145107,2023-04-30T20:15:24Z,2023-04-30T20:20:21Z,CONTRIBUTOR,"Apologies, that's my bad. Looks like I introduced a broken test and didn't manually double check the results coming back. The right shift test should have been: ``` python right_expected = Dataset( { ""x"": (""index"", [0, 0, 2, 2]), ""y"": (""index"", [-1, -1, -2, -2]), ""level"": (""index"", [0, 0, 4, 4]), ""index"": [0, 1, 2, 3], } ) right_actual = (left_expected.groupby(""level"") >> shift).reset_coords(names=""level"") assert_equal(right_expected, right_actual) ``` I haven't paid attention to this issue, but doing the groupby manually didn't have the bug fwiw. <details><summary>Probably overkill test that only fails at the last assert before this fix</summary> <p> ```python def test_groupby_math_bitshift() -> None: # create new dataset of int's only ds = Dataset( { ""x"": (""index"", np.ones(4, dtype=int)), ""y"": (""index"", np.ones(4, dtype=int) * -1), ""level"": (""index"", [1, 1, 2, 2]), ""index"": [0, 1, 2, 3], } ) shift = DataArray([1, 2, 1], [(""level"", [1, 2, 8])]) left_expected = Dataset( { ""x"": (""index"", [2, 2, 4, 4]), ""y"": (""index"", [-2, -2, -4, -4]), ""level"": (""index"", [2, 2, 8, 8]), ""index"": [0, 1, 2, 3], } ) left_manual = [] for lev, group in ds.groupby(""level""): shifter = shift.sel(level=lev) left_manual.append(group << shifter) left_actual = xr.concat(left_manual, dim=""index"").reset_coords(names=""level"") assert_equal(left_expected, left_actual) left_actual = (ds.groupby(""level"") << shift).reset_coords(names=""level"") assert_equal(left_expected, left_actual) right_expected = Dataset( { ""x"": (""index"", [0, 0, 2, 2]), ""y"": (""index"", [-1, -1, -2, -2]), ""level"": (""index"", [0, 0, 4, 4]), ""index"": [0, 1, 2, 3], } ) right_manual = [] for lev, group in left_expected.groupby(""level""): shifter = shift.sel(level=lev) right_manual.append(group >> shifter) right_actual = xr.concat(right_manual, dim=""index"").reset_coords(names=""level"") assert_equal(right_expected, right_actual) right_actual = (left_expected.groupby(""level"") >> shift).reset_coords(names=""level"") assert_equal(right_expected, right_actual) ``` </p> </details> ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1689773381 https://github.com/pydata/xarray/pull/7741#issuecomment-1524063361,https://api.github.com/repos/pydata/xarray/issues/7741,1524063361,IC_kwDOAMm_X85a11yB,6145107,2023-04-26T21:24:14Z,2023-04-26T21:24:14Z,CONTRIBUTOR,"The commits yesterday were to add an entry to whats-new and a couple examples lines to the computation doc page. I didn't find the binary_ops listed in methods anywhere, so this was the best idea I had? In the block just above missing-values: https://xray--7741.org.readthedocs.build/en/7741/user-guide/computation.html#missing-values Otherwise, I think this is done from my perspective. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1659654612 https://github.com/pydata/xarray/pull/2144#issuecomment-496036760,https://api.github.com/repos/pydata/xarray/issues/2144,496036760,MDEyOklzc3VlQ29tbWVudDQ5NjAzNjc2MA==,6145107,2019-05-26T22:32:29Z,2019-05-26T22:32:29Z,CONTRIBUTOR,"@dopplershift I built from your start here, over in #2989 and keeping your initial code and tests along with an edited version of your what's-new. Kept you in the what's new, so hope that's cool otherwise lmk. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,323823894 https://github.com/pydata/xarray/pull/2144#issuecomment-495723917,https://api.github.com/repos/pydata/xarray/issues/2144,495723917,MDEyOklzc3VlQ29tbWVudDQ5NTcyMzkxNw==,6145107,2019-05-24T17:35:59Z,2019-05-24T17:35:59Z,CONTRIBUTOR,"I took a stab at this after being reminded about it. https://github.com/abrammer/xarray/tree/strftime_addition Can open a new PR if this one has gone stale. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,323823894 https://github.com/pydata/xarray/pull/2144#issuecomment-424100894,https://api.github.com/repos/pydata/xarray/issues/2144,424100894,MDEyOklzc3VlQ29tbWVudDQyNDEwMDg5NA==,6145107,2018-09-24T19:45:54Z,2018-09-24T19:54:11Z,CONTRIBUTOR,"ok, thanks. Anything an outsider can help with?","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,323823894 https://github.com/pydata/xarray/pull/2144#issuecomment-424096368,https://api.github.com/repos/pydata/xarray/issues/2144,424096368,MDEyOklzc3VlQ29tbWVudDQyNDA5NjM2OA==,6145107,2018-09-24T19:30:09Z,2018-09-24T19:30:09Z,CONTRIBUTOR,"Was looking for this functionality and came across the parent [issue](https://github.com/pydata/xarray/issues/2090) and this work around, did this just get forgotten or was there more work to be done? It'd be great to have this functionality readily available without having to work around. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,323823894