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/1121#issuecomment-260683252,https://api.github.com/repos/pydata/xarray/issues/1121,260683252,MDEyOklzc3VlQ29tbWVudDI2MDY4MzI1Mg==,1217238,2016-11-15T16:05:20Z,2016-11-15T16:05:20Z,MEMBER,"Nesting xarray objects was not an intended use case, but I agree, this is ridiculously slow.
Looks the culprit is `xarray.core.utils.to_0d_object_array`:
https://github.com/pydata/xarray/blob/d66f673ab25fe0fc0483bd5d67479fc94a14e46d/xarray/core/utils.py#L198-L212
Specifically, when `value` is an `xarray.DataArray`, these lines appear to trigger a iterating over every element of the DataArray, one by one:
```
result = np.empty((1,), dtype=object)
result[:] = [value]
```
I'm definitely open to fixes here. Creating a NumPy object array can be very fussy -- NumPy tries way too hard to coerce dtypes.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,189415576