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 1642301775,PR_kwDOAMm_X85M-3H-,7684,Automatically chunk `other` in GroupBy binary ops.,2448579,closed,0,,,2,2023-03-27T15:15:22Z,2023-07-28T03:12:20Z,2023-07-27T16:41:33Z,MEMBER,,0,pydata/xarray/pulls/7684,"- [x] Closes #7683 - [x] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7684/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1642299599,I_kwDOAMm_X85h44DP,7683,automatically chunk in groupby binary ops,2448579,closed,0,,,0,2023-03-27T15:14:09Z,2023-07-27T16:41:35Z,2023-07-27T16:41:34Z,MEMBER,,,,"### What happened? From https://discourse.pangeo.io/t/xarray-unable-to-allocate-memory-how-to-size-up-problem/3233/4 Consider ``` python # ds is dataset with big dask arrays mean = ds.groupby(""time.day"").mean() mean.to_netcdf() mean = xr.open_dataset(...) ds.groupby(""time.day"") - mean ``` In `GroupBy._binary_op` https://github.com/pydata/xarray/blob/39caafae4452f5327a7cd671b18d4bb3eb3785ba/xarray/core/groupby.py#L616 we will eagerly construct `other` that is of the same size as `ds`. ### What did you expect to happen? I think the only solution is to automatically chunk if `ds` has dask arrays, and `other` (or `mean`) isn't backed by dask arrays. A chunk size of `1` seems sensible. ### Minimal Complete Verifiable Example _No response_ ### MVCE confirmation - [ ] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray. - [ ] Complete example — the example is self-contained, including all data and the text of any traceback. - [ ] Verifiable example — the example copy & pastes into an IPython prompt or [Binder notebook](https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/examples/blank_template.ipynb), returning the result. - [ ] New issue — a search of GitHub Issues suggests this is not a duplicate. ### Relevant log output _No response_ ### Anything else we need to know? _No response_ ### Environment
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7683/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 1642317716,I_kwDOAMm_X85h48eU,7685,Add welcome bot?,2448579,closed,0,,,6,2023-03-27T15:24:25Z,2023-04-06T01:55:55Z,2023-04-06T01:55:55Z,MEMBER,,,,"### Is your feature request related to a problem? Given all the outreachy interest (and perhaps just in general) it may be nice to enable a [welcome bot](https://github.com/apps/welcome) like on the Jupyter repos ### Describe the solution you'd like _No response_ ### Describe alternatives you've considered _No response_ ### Additional context _No response_","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7685/reactions"", ""total_count"": 3, ""+1"": 3, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue