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-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-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