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/7713#issuecomment-1527652802,https://api.github.com/repos/pydata/xarray/issues/7713,1527652802,IC_kwDOAMm_X85bDiHC,2448579,2023-04-28T14:26:15Z,2023-04-28T14:26:32Z,MEMBER,This is a duplicate of https://github.com/pydata/xarray/issues/4404 It seems like this is for MultiIndex support. A better error message and documentation would be a great contribution! Let's move the conversation there,"{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1652227927
https://github.com/pydata/xarray/issues/7713#issuecomment-1527605739,https://api.github.com/repos/pydata/xarray/issues/7713,1527605739,IC_kwDOAMm_X85bDWnr,5821660,2023-04-28T13:55:17Z,2023-04-28T13:55:17Z,MEMBER,"The code is there since #867 by @shoyer which was committed almost 7 years ago.
I've no idea what's the purpose for packing tuples into 0d arrays but as there are also tests for it in the above PR I'm assuming there is one real reason. Maybe @shoyer can chime in here to shed some light?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1652227927
https://github.com/pydata/xarray/issues/7713#issuecomment-1526051246,https://api.github.com/repos/pydata/xarray/issues/7713,1526051246,IC_kwDOAMm_X85a9bGu,44142765,2023-04-27T17:11:09Z,2023-04-27T17:11:34Z,NONE,"@kmuehlbauer It looks like a bug in the code if indeed tuples are meant to be treated the same as any sequence of data. These lines https://github.com/pydata/xarray/blob/0f4e99d036b0d6d76a3271e6191eacbc9922662f/xarray/core/variable.py#L259-L260 suggest that when a tuple is passed in, it is converted to a 0-dimension array of type object via https://github.com/pydata/xarray/blob/0f4e99d036b0d6d76a3271e6191eacbc9922662f/xarray/core/utils.py#L344-L348
Maybe removing the tuple type check and relying on this line https://github.com/pydata/xarray/blob/0f4e99d036b0d6d76a3271e6191eacbc9922662f/xarray/core/variable.py#L287-L288 is better?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1652227927
https://github.com/pydata/xarray/issues/7713#issuecomment-1525780533,https://api.github.com/repos/pydata/xarray/issues/7713,1525780533,IC_kwDOAMm_X85a8ZA1,5821660,2023-04-27T14:17:26Z,2023-04-27T14:17:26Z,MEMBER,"@zoj613 Thanks for raising this.
The root-cause is that the tuple is returned from `as_compatible_data` as single element array:
```python
import xarray as xr
print(xr.core.variable.as_compatible_data((2, 3, 4)))
```
```python
array((2, 3, 4), dtype=object)
```
This then breaks with the error you are seeing. I'm not quite sure if this is a bug in the code, a bug in the doc or no bug at all. But as a tuple is easily wrapped by `np.array` there should be a reason why Xarray is currently not able to digest tuples.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1652227927