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/1151#issuecomment-269709113,https://api.github.com/repos/pydata/xarray/issues/1151,269709113,MDEyOklzc3VlQ29tbWVudDI2OTcwOTExMw==,1217238,2016-12-29T23:22:13Z,2016-12-29T23:22:13Z,MEMBER,"> Is there any helper function to facilitate this?
Yes, indeed. [`_maybe_promote`](https://github.com/pydata/xarray/blob/89a6732346542b234c0c655034c6e0ab49fecc56/xarray/core/common.py#L686) returns `dtype` and `fill_value` for inserting missing values, based on an original `dtype`. I guess it makes sense to start with calling one of the numpy utilities such as [`numpy.result_type`](https://docs.scipy.org/doc/numpy-1.10.1/reference/generated/numpy.result_type.html#numpy.result_type) for finding the common dtype to insert into `_maybe_promote`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,193294569
https://github.com/pydata/xarray/issues/1151#issuecomment-269507204,https://api.github.com/repos/pydata/xarray/issues/1151,269507204,MDEyOklzc3VlQ29tbWVudDI2OTUwNzIwNA==,1217238,2016-12-28T17:07:31Z,2016-12-28T17:07:31Z,MEMBER,"@crusaderky Ah, I understand now. I agree that this makes sense for concatenating along an existing dimension (e.g., `xarray.concat([a, b], dim='x')` or `xarray.concat([a, c], dim='x')`) if the variables do not have the dimension to be concatenated. The existing logic to handle merging coordinates with possible dropping is the `merge_variables` function in `merge.py` (if `compat='minimal'`) -- note that none of the logic is specific to scalar coordinates.
For concatenating along a new dimension (e.g., `xarray.concat([a, b], dim='z')` or `xarray.concat([a, c], dim='z')`), I think we would want to default to a scalar coordinate of the appropriate missing value (e.g., `coords={'y': np.nan}`).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,193294569
https://github.com/pydata/xarray/issues/1151#issuecomment-269352243,https://api.github.com/repos/pydata/xarray/issues/1151,269352243,MDEyOklzc3VlQ29tbWVudDI2OTM1MjI0Mw==,1217238,2016-12-27T16:57:51Z,2016-12-27T16:57:51Z,MEMBER,"@crusaderky I don't understand the distinction between ambiguous/unambiguous coords -- can you clarify? Also, why treat scalar coordinates differently? Most xarray machinery doesn't special case arrays of a certain dimensionality.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,193294569
https://github.com/pydata/xarray/issues/1151#issuecomment-264784694,https://api.github.com/repos/pydata/xarray/issues/1151,264784694,MDEyOklzc3VlQ29tbWVudDI2NDc4NDY5NA==,1217238,2016-12-05T07:27:54Z,2016-12-05T07:27:54Z,MEMBER,I agree -- we really should do an outer join of variables/coordinates in `concat`. I think here is another GitHub issue tracking this (this has certainly been raised before).,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,193294569