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/631#issuecomment-484934985,https://api.github.com/repos/pydata/xarray/issues/631,484934985,MDEyOklzc3VlQ29tbWVudDQ4NDkzNDk4NQ==,5635139,2019-04-19T15:39:54Z,2019-04-19T15:39:54Z,MEMBER,"Adding a v confusing error message which my colleague just hit (not exactly the same as this, but thought it wasn't worth a whole new issue):
```
In [10]: xr.DataArray(
...: data=1,
...: coords={
...: 'test':[1]#,
...: },
...: dims=['test']
...: )
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
in
4 'test':[1]#,
5 },
----> 6 dims=['test']
7 )
~/workspace/xarray/xarray/core/dataarray.py in __init__(self, data, coords, dims, name, attrs, encoding, indexes, fastpath)
228
229 data = as_compatible_data(data)
--> 230 coords, dims = _infer_coords_and_dims(data.shape, coords, dims)
231 variable = Variable(dims, data, attrs, encoding, fastpath=True)
232
~/workspace/xarray/xarray/core/dataarray.py in _infer_coords_and_dims(shape, coords, dims)
76
77 for d, s in zip(v.dims, v.shape):
---> 78 if s != sizes[d]:
79 raise ValueError('conflicting sizes for dimension %r: '
80 'length %s on the data but length %s on '
KeyError: 'test'
```
...nothing to do with the `test` entry, it's that data is a scalar","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,112254767
https://github.com/pydata/xarray/issues/631#issuecomment-327726641,https://api.github.com/repos/pydata/xarray/issues/631,327726641,MDEyOklzc3VlQ29tbWVudDMyNzcyNjY0MQ==,2443309,2017-09-07T08:19:57Z,2017-09-07T08:19:57Z,MEMBER,"The first example here was fixed in #1539.
The second issue still exists but now requires `dims` to be specified explicitly.
```Python
In [9]: Dataset({""a"": DataArray(np.zeros(3), dims='a', coords={""a"": list(""xyz"")})})
...:
...:
Out[9]:
Dimensions: (a: 3)
Coordinates:
* a (a) float64 0.0 0.0 0.0
Data variables:
*empty*
```
Do we agree it is safe to say that no key should be repeated between `data` and `coords`? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,112254767
https://github.com/pydata/xarray/issues/631#issuecomment-149632771,https://api.github.com/repos/pydata/xarray/issues/631,149632771,MDEyOklzc3VlQ29tbWVudDE0OTYzMjc3MQ==,1217238,2015-10-20T16:59:23Z,2015-10-20T16:59:23Z,MEMBER,"Yes, @markelg I think you describe each of these issues correctly. They should each result in more informative errors.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,112254767
https://github.com/pydata/xarray/issues/631#issuecomment-149458659,https://api.github.com/repos/pydata/xarray/issues/631,149458659,MDEyOklzc3VlQ29tbWVudDE0OTQ1ODY1OQ==,6883049,2015-10-20T07:15:20Z,2015-10-20T07:15:20Z,CONTRIBUTOR,"This is related to #457. In the first case, I think that the error message must be improved, but I do not think that Error is itself is a bug. From the netCDF data model point of view, it does not make sense to define a two dimensional variable sharing the name with a one-dimensional coordinate.
The second example does look like a bug, as it should raise an error too, in my opinion, as the function Dataset is given contradictory information (two different sets of values for the same variable ""a""). In netCDF files you cannot have two variables with the same name, and coordinate variables are just regular variables.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,112254767
https://github.com/pydata/xarray/issues/631#issuecomment-149386132,https://api.github.com/repos/pydata/xarray/issues/631,149386132,MDEyOklzc3VlQ29tbWVudDE0OTM4NjEzMg==,1217238,2015-10-20T00:39:53Z,2015-10-20T00:39:53Z,MEMBER,"Oh my, this certainly does look like a bug (or several).
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,112254767