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/issues/6053#issuecomment-1178897408,https://api.github.com/repos/pydata/xarray/issues/6053,1178897408,IC_kwDOAMm_X85GRIwA,4502,2022-07-08T11:49:23Z,2022-07-08T11:49:23Z,NONE,"Re `xr.broadcast(ds)[0].sum(dims)` -- Thanks, that's neat and may be useful as a workaround, but it looks like it could incur significant extra CPU and RAM costs (tiling all variables to the full size in memory before summing over the tiled values)? Or is there some clever optimisation under the hood which would avoid this?
I also only wanted it to (behave as though it) broadcast the dims that are summed over, but this looks like it will broadcast all dims including those not summed over?
Overall I think it'd be better to have an option on sum (like `missing_dim='broadcast'` as suggested in #6749), rather than documenting a partial workaround like this, given the caveats attached to the workaround and that (to me at least) the broadcasting sum is more in keeping with the usual mathematical semantics of 'sum' than what 'sum' currently does.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1074303184
https://github.com/pydata/xarray/issues/6053#issuecomment-1178754493,https://api.github.com/repos/pydata/xarray/issues/6053,1178754493,IC_kwDOAMm_X85GQl29,43316012,2022-07-08T09:17:53Z,2022-07-08T09:17:53Z,COLLABORATOR,"See discussion in https://github.com/pydata/xarray/issues/6749
Maybe the current implementation of sum is not correct?
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1074303184
https://github.com/pydata/xarray/issues/6053#issuecomment-1177990250,https://api.github.com/repos/pydata/xarray/issues/6053,1177990250,IC_kwDOAMm_X85GNrRq,2448579,2022-07-07T17:45:08Z,2022-07-07T17:55:23Z,MEMBER,"`xr.broadcast(ds)[0].sum(dims)` should do this.
We could add it here: https://xarray.pydata.org/en/latest/howdoi.html and to the docs under [Aggregations](https://docs.xarray.dev/en/stable/user-guide/computation.html#aggregation)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1074303184