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/1807#issuecomment-354701098,https://api.github.com/repos/pydata/xarray/issues/1807,354701098,MDEyOklzc3VlQ29tbWVudDM1NDcwMTA5OA==,1217238,2018-01-02T04:12:35Z,2018-01-02T04:12:35Z,MEMBER,"0-dimensional numpy array don't have a length because it isn't entirely clear what that would mean. In many cases, NumPy treats them as equivalent to Python scalars (e.g., `float`), which doesn't have a defined length.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,285349783
https://github.com/pydata/xarray/issues/1807#issuecomment-354700693,https://api.github.com/repos/pydata/xarray/issues/1807,354700693,MDEyOklzc3VlQ29tbWVudDM1NDcwMDY5Mw==,13813076,2018-01-02T04:05:13Z,2018-01-02T04:05:13Z,NONE,"You're absolutely correct about the ndarray behavior; I was mistaken.
I mostly have the built-in python types in mind when looking for a length of 0. Now that I think of it, I've hit this same issue with ndarrays. I'm not sure what the ""right"" behavior would be here, since I'm not sure why the ndarrays behave differently than the base python types.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,285349783
https://github.com/pydata/xarray/issues/1807#issuecomment-354699725,https://api.github.com/repos/pydata/xarray/issues/1807,354699725,MDEyOklzc3VlQ29tbWVudDM1NDY5OTcyNQ==,1217238,2018-01-02T03:50:07Z,2018-01-02T03:50:07Z,MEMBER,"I agree that it is a little surprising that we create a scalar array for tuples instead of 1D array like NumPy. To be honest, I'm not entirely sure why we do that, but looking in git history suggests it had something to do with making it easier to support `pandas.MultiIndex` (which has scalar values given by tuples).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,285349783
https://github.com/pydata/xarray/issues/1807#issuecomment-354699553,https://api.github.com/repos/pydata/xarray/issues/1807,354699553,MDEyOklzc3VlQ29tbWVudDM1NDY5OTU1Mw==,1217238,2018-01-02T03:47:10Z,2018-01-02T03:47:10Z,MEMBER,"Thanks for the report.
Creating a DataArray with a tuple actually creates a scalar (0-dimensional array):
```
In [40]: dr = xr.DataArray(())
In [41]: dr
Out[41]:
array((), dtype=object)
In [42]: dr.shape
Out[42]: ()
```
We then raise a `TypeError` when calculating the length of an empty DataArray, which is consistent with NumPy.
In contrast, if you make an empty DataArray with an empty list, you do get a 1D dimensional length 0 array:
```
In [54]: dr = xr.DataArray([])
In [55]: len(dr)
Out[55]: 0
In [56]: dr.shape
Out[56]: (0,)
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,285349783