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/2907#issuecomment-484970078,https://api.github.com/repos/pydata/xarray/issues/2907,484970078,MDEyOklzc3VlQ29tbWVudDQ4NDk3MDA3OA==,2448579,2019-04-19T17:51:44Z,2019-04-19T17:51:44Z,MEMBER,"automatic broadcasting is an extremely useful feature of xarray: See https://xarray.pydata.org/en/stable/computation.html#broadcasting-by-dimension-name for examples.
> What I didn't know was that the dimensions to multiply have to have the same names.
If the dimensions don't have the same name; xarray ""broadcasts"" both variables so that they each have both dimensions and then does the arithmetic operation you ask it to.
> I thought I could sum over different coordinates indicating the names within the dims keyword, but the implementation makes totally sense now. To summarize:
This is correct but you're misunderstanding the applicability here (I think).
> But shouldn't there be an error message if one specifies dimensions to dims that are not in both of the dataarrays?
No, broadcasting is a feature.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,435170643
https://github.com/pydata/xarray/issues/2907#issuecomment-484923935,https://api.github.com/repos/pydata/xarray/issues/2907,484923935,MDEyOklzc3VlQ29tbWVudDQ4NDkyMzkzNQ==,2448579,2019-04-19T15:05:25Z,2019-04-19T15:06:03Z,MEMBER,"Here's some relevant documentation: https://xarray.pydata.org/en/stable/computation.html#broadcasting-by-dimension-name
EDIT: Please let us know if these can be improved in any way (or even better, send in a pull request to improve it).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,435170643
https://github.com/pydata/xarray/issues/2907#issuecomment-484923134,https://api.github.com/repos/pydata/xarray/issues/2907,484923134,MDEyOklzc3VlQ29tbWVudDQ4NDkyMzEzNA==,2448579,2019-04-19T15:02:59Z,2019-04-19T15:02:59Z,MEMBER,"You have two different dimensions here; and xarray is broadcasting so those two statements are not equal i.e. both `weights` and `models` end up being 2D arrays which are then operated upon by `dot`.
How about `xr.dot(weights_da.rename({'models': 'model name'}), models)`?","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,435170643