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/5030#issuecomment-1058577301,https://api.github.com/repos/pydata/xarray/issues/5030,1058577301,IC_kwDOAMm_X84_GJuV,35968931,2022-03-03T22:35:08Z,2022-03-03T22:37:16Z,MEMBER,"> For datatree, you could apply the reduction with the set-intersection of provided dims and dims present in a node (if that's the right term). I specifically want the user to be able to choose between different behaviours with a flag, but you're right that I could just deal with this at the datatree level instead of here. That would make a fair amount of sense, and it would cover Julius' use-case (via encouraging him to store his models in a tree, so that `for ds in model_datasets` would become a loop over nodes in a tree). > My concern is that we could conceivably adding missing_dims to any function that takes a dim argument, which is pretty much the whole API. Do you think that's a problem though? We added `keep_attrs` to even more of the API than this would cover. Specifically I would want to add it to the `REDUCE_METHODS`, the `NAN_REDUCE_METHODS`, and the `NAN_CUM_METHODS` (so `{""all"", ""any"", ""max"", ""min"", ""mean"", ""prod"", ""sum"", ""std"", ""var"", ""median"", ""cumsum"", ""cumprod""}`). I'm fine with doing it either here or in `datatree` personally.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,830638672 https://github.com/pydata/xarray/issues/5030#issuecomment-1058446727,https://api.github.com/repos/pydata/xarray/issues/5030,1058446727,IC_kwDOAMm_X84_Fp2H,35968931,2022-03-03T20:19:39Z,2022-03-03T20:19:39Z,MEMBER,"I ran into the same sort of thing today, when trying to loop over many datasets (each of which contained the contents of a node in a datatree...). I also think that adding a `missing_dims` argument to all the array reduce methods would be useful, and I plan to have a go at it.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,830638672