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/649#issuecomment-155434562,https://api.github.com/repos/pydata/xarray/issues/649,155434562,MDEyOklzc3VlQ29tbWVudDE1NTQzNDU2Mg==,1197350,2015-11-10T14:27:40Z,2015-11-10T14:27:40Z,MEMBER,"@shoyer awesome! ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,115897556 https://github.com/pydata/xarray/issues/649#issuecomment-155284553,https://api.github.com/repos/pydata/xarray/issues/649,155284553,MDEyOklzc3VlQ29tbWVudDE1NTI4NDU1Mw==,1217238,2015-11-10T04:33:14Z,2015-11-10T04:33:14Z,MEMBER,"This is yet another issue that magically _just works_ after merging #648! I'll add your example to the test suite as a regression test. I was actually holding off on widely advertising `xray.broadcast_arrays` for exactly this reason -- there wasn't an easy way to fix this before, and this was a pretty obvious edge case. Now I think we can probably safely guarantee the behavior of `broadcast_arrays`. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,115897556 https://github.com/pydata/xarray/issues/649#issuecomment-155118253,https://api.github.com/repos/pydata/xarray/issues/649,155118253,MDEyOklzc3VlQ29tbWVudDE1NTExODI1Mw==,1197350,2015-11-09T16:42:00Z,2015-11-09T16:42:00Z,MEMBER,"> Most gsw functions will call np.broadcast_arrays for you internally. I know. > So you can pass ds.a.values instead. It is ugly, I know. but consistent when using libraries that expect numpy array. This only works if the all the arrays are appropriately shaped to begin with. It does not work in this case. ``` python np.broadcast_arrays(ds.x.values,ds.y.values,ds.a.values) ``` raises `ValueError: shape mismatch: objects cannot be broadcast to a single shape`. The great advantage of xray's broadcasting is that it is ""aware"" of the relationship between axes and coordinates, independently of the shape of the underlying numpy arrays. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,115897556