issues: 574097799
This data as json
| id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 574097799 | MDU6SXNzdWU1NzQwOTc3OTk= | 3820 | Documentation of DataArray does not warn that inferring dimension names is deprecated | 8833517 | closed | 0 | 8 | 2020-03-02T16:37:01Z | 2020-03-03T19:34:39Z | 2020-03-03T00:38:05Z | CONTRIBUTOR | The documentation states:
Which seems to be no longer the case. MCVE Code Sample```python da = xr.DataArray(np.zeros((2, 2)), coords={'x': [1, 2], 'y': [1, 2]}) ValueError Traceback (most recent call last) <ipython-input-22-0d63eed9a72f> in <module> ----> 1 da = xr.DataArray(np.zeros((2, 2)), coords={'x': [1, 2], 'y': [1, 2]}) /scratch/local/lib/python3.8/site-packages/xarray/core/dataarray.py in init(self, data, coords, dims, name, attrs, encoding, indexes, fastpath) 366 data = _check_data_shape(data, coords, dims) 367 data = as_compatible_data(data) --> 368 coords, dims = _infer_coords_and_dims(data.shape, coords, dims) 369 variable = Variable(dims, data, attrs, encoding, fastpath=True) 370 /scratch/local/lib/python3.8/site-packages/xarray/core/dataarray.py in _infer_coords_and_dims(shape, coords, dims)
105 if utils.is_dict_like(coords):
106 # deprecated in GH993, removed in GH1539
--> 107 raise ValueError(
108 "inferring DataArray dimensions from "
109 "dictionary like ValueError: inferring DataArray dimensions from dictionary like Expected OutputAn update of the documentation to correctly specify the current behavior. (I'll propose a PR later today) Problem DescriptionA mismatch between API specification and it's behavior seems like a problem to me :) Output of
|
{
"url": "https://api.github.com/repos/pydata/xarray/issues/3820/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |