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 499937876,MDU6SXNzdWU0OTk5Mzc4NzY=,3355,"Define aligning, broadcasting, merging, concatenating, combining in new glossary",2818208,closed,0,,,1,2019-09-29T16:16:45Z,2023-08-18T19:49:00Z,2023-08-18T19:49:00Z,CONTRIBUTOR,,,,"Over at https://github.com/pydata/xarray/pull/3352, we're working on a new page describing key Xarray terminology for https://github.com/pydata/xarray/issues/2410. Since it's already a big PR, and we may need to iterate on the definitions a few times, this issue is for extending the glossary once that PR is merged. Some terms are to add are: **aligning**, **broadcasting**, **merging**, **concatenating**, **combining**.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3355/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 499807676,MDExOlB1bGxSZXF1ZXN0MzIyNDM3NDI5,3352,Add glossary to documentation,2818208,closed,0,,,6,2019-09-28T18:45:40Z,2019-09-30T01:16:49Z,2019-09-29T23:39:54Z,CONTRIBUTOR,,0,pydata/xarray/pulls/3352,"This is my attempt at closing https://github.com/pydata/xarray/issues/2410. I've borrowed a bit of text from that PR (thanks @horta), from https://github.com/pydata/xarray/issues/1295, and from the xarray docs. I avoided verbose examples—it makes quickly searching and reading the glossary difficult—and put most of the effort into explaining dimension vs non-dimension coordinates, which in my experience opens the door to true xarray enlightenment. Corrections, comments, or suggestions for additional terminology welcome.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3352/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 482452409,MDU6SXNzdWU0ODI0NTI0MDk=,3231,Dict-like argument support for assign_coords(),2818208,closed,0,,,3,2019-08-19T18:07:39Z,2019-09-28T20:44:08Z,2019-09-28T20:44:08Z,CONTRIBUTOR,,,,"Often the xarray API supports [either a `dict` or `kwargs`](https://github.com/pydata/xarray/blob/master/xarray/core/utils.py#L257), and it seems like this should be consistent as often as possible. With `assign_coords`, this works as expected: ```python >>> dims = [""x"", ""y""] >>> coords = {""fruit"": (""x"", [""apple"", ""banana""])} >>> arr = xr.DataArray([[1,2,3],[4,5,6]], dims=dims, coords=coords) >>> arr.assign_coords(color=(""x"", [""red"", ""yellow""])) array([[1, 2, 3], [4, 5, 6]]) Coordinates: fruit (x) >> arr.assign_coords({""color"": (""x"", [""red"", ""yellow""])}) *** TypeError: assign_coords() takes 1 positional argument but 2 were given ```","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3231/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 499811729,MDExOlB1bGxSZXF1ZXN0MzIyNDQwMzk1,3353,Remove `complex.nc` from built docs,2818208,closed,0,,,1,2019-09-28T19:23:10Z,2019-09-28T19:57:37Z,2019-09-28T19:57:37Z,CONTRIBUTOR,,0,pydata/xarray/pulls/3353,"I assume this is related to https://github.com/pydata/xarray/issues/3297 or an associated issue. Basically, a file, `complex.nc`, is being added to `doc/` after running `make clean && make html`. Would be nice to suppress this. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3353/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 486079784,MDExOlB1bGxSZXF1ZXN0MzExNjA1NzA4,3270,Amend documentation to clean up temporary files/directories in examples,2818208,closed,0,,,1,2019-08-27T23:16:55Z,2019-08-28T00:02:05Z,2019-08-28T00:02:02Z,CONTRIBUTOR,,0,pydata/xarray/pulls/3270," - [x] Closes #3227. - [x] No CI tests added, but I ran `make clean` and `make html` to confirm the temporary files are no longer permanently created. I also confirmed the `:suppress:` blocks weren't showing up in the built HTML. - [x] No need to pass `black . && mypy . && flake8`. - [x] Fully documented in `whats-new.rst`. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3270/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 482023929,MDU6SXNzdWU0ODIwMjM5Mjk=,3227,Building the docs creates temporary files,2818208,closed,0,,,7,2019-08-18T18:38:06Z,2019-08-28T00:02:02Z,2019-08-28T00:02:02Z,CONTRIBUTOR,,,,"#### MCVE Apologies if this has already been noted, but I can't find an open issue. When I create the docs from scratch, I see a couple temporary files and directories that appear to have been created by accident. If this is a legitimate issue, I'm happy to put together a PR. Here is an MCVE: ```bash (xarray-docs) gwg:doc gwg$ make clean rm -rf _build/* rm -rf generated/* rm -rf auto_gallery/ (xarray-docs) gwg:doc gwg$ git status On branch master Your branch is up to date with 'origin/master'. nothing to commit, working tree clean (xarray-docs) gwg:doc gwg$ make html sphinx-build -b html -d _build/doctrees . _build/html' ... Build finished. The HTML pages are in _build/html. (xarray-docs) gwg:doc gwg$ git status On branch master Your branch is up to date with 'origin/master'. Untracked files: (use ""git add ..."" to include in what will be committed) example-no-leap.nc foo.zarr/ manipulated-example-data.nc path/ nothing added to commit but untracked files present (use ""git add"" to track) ``` #### Expected Output I would expect no files to be created by `make html` in the `doc` directory. #### Problem Description It's not clear this will happen and may result in some people (me!) accidentally committing these files with `git commit -A`.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3227/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 484089737,MDU6SXNzdWU0ODQwODk3Mzc=,3240,assign_coords adds coordinates without a new dimension if the value is scalar,2818208,closed,0,,,5,2019-08-22T16:14:05Z,2019-08-26T08:16:37Z,2019-08-26T08:16:37Z,CONTRIBUTOR,,,,"### Problem `assign_corods` correctly disallows creating a new dimension when assigning `list`-like coords with a name that does not match an existing dimension. However, it does allow this operation if the value is scalar. ### MCVE Consider the following `DataArray`: ```python >>> coords = {""fruit"": (""x"", [""apple"", ""banana""])} >>> arr = xr.DataArray([[1, 2, 3], [4, 5, 6]], dims=(""x"", ""y""), coords=coords) >>> arr array([[1, 2, 3], [4, 5, 6]]) Coordinates: fruit (x) >> arr.assign_coords(color=(""x"", [""red"", ""yellow""])) array([[1, 2, 3], [4, 5, 6]]) Coordinates: fruit (x) >> arr.assign_coords(color=[""red"", ""yellow""]) ... ValueError: cannot add coordinates with new dimensions to a DataArray ``` The above fails because Xarray, in the absence of an explicit dimension, tries to assign the new coordinates to a `color` dimension which does not exist. So far so good. But why does _this_ work? ```python >>> arr = arr.assign_coords(color=""red"") >>> arr array([[1, 2, 3], [4, 5, 6]]) Coordinates: fruit (x) >> arr.coords Coordinates: fruit (x) Mapping from names matching dimensions and values given by (lists of) the names of existing coordinates or variables to set as new (multi-)index. This suggests that one can set a `DataArray` instance's coordinates by passing in a dimension and a list-like object of coordinates. #### MCVE ```python In [1]: import numpy as np In [2]: import xarray as xr In [3]: arr = xr.DataArray(data=np.ones((2, 3)), dims=['x', 'y']) In [4]: arr.dims Out[4]: ('x', 'y') In [5]: arr.set_index({'x': range(2)}) KeyError ... 144 for n in var_names: --> 145 var = variables[n] 146 if (current_index_variable is not None and 147 var.dims != current_index_variable.dims): KeyError: 0 ``` At first, I thought it might be because `coords` and `_coords` were not being set in this case: ```python In [18]: arr.coords Out[18]: Coordinates: *empty* In [19]: arr._coords Out[19]: OrderedDict() ``` but even if I set the coordinates first and then try to re-index, it fails: ```python In [20]: arr = xr.DataArray(data=np.ones((2, 3)), dims=['x', 'y'], coords={'x': range(2), 'y': range(3)}) In [21]: arr.set_index({'x': ['a', 'b', 'c']}) ... 144 for n in var_names: --> 145 var = variables[n] 146 if (current_index_variable is not None and 147 var.dims != current_index_variable.dims): ``` #### Expected Output I expect my MCVE to work based on the documentation. #### Problem Solution My guess is that the issue is Xarray is using the `merge_indexes` function ([see here](https://github.com/pydata/xarray/blob/master/xarray/core/dataarray.py#L1444)) from the `Dataset` module, and there is no concept of a `variable` in a `DataArray`.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3176/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 467856527,MDExOlB1bGxSZXF1ZXN0Mjk3NDA4MzQx,3126,Return immutable view of Pandas indexes,2818208,closed,0,,,9,2019-07-14T16:02:43Z,2019-08-19T07:33:46Z,2019-08-19T07:33:46Z,CONTRIBUTOR,,0,pydata/xarray/pulls/3126,"- This closes #2949. We return a shallow copy of Pandas indexes to ensure immutability. - Added `test_index_immutability` in `tests/test_dataarray.py`. - Amended `whats-new.rst`.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3126/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 467865659,MDExOlB1bGxSZXF1ZXN0Mjk3NDE0NjY0,3128,Support keyword API for `Dataset.drop`,2818208,closed,0,,,20,2019-07-14T17:36:03Z,2019-08-19T02:24:00Z,2019-08-18T17:42:45Z,CONTRIBUTOR,,0,pydata/xarray/pulls/3128,"- Closes https://github.com/pydata/xarray/issues/2910. - In `tests/test_dataset`, added `test_drop_labels_by_keyword` - Added a utility function `is_list_like`. - Documented in `whats-new.rst` and confirmed API docs built correctly.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3128/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 481935553,MDExOlB1bGxSZXF1ZXN0MzA4MzI0ODM1,3226,Add PR checklist to contributing docs,2818208,closed,0,,,3,2019-08-17T23:22:49Z,2019-08-18T17:49:24Z,2019-08-18T17:40:30Z,CONTRIBUTOR,,0,pydata/xarray/pulls/3226,"I'm a new contributor working on a couple PRs for Xarray and wished I had a short checklist of things to do before pushing a commit. First, I think such an overview list is useful per se. Second, CI takes a while, and it's much faster to just run `black .` or to build the docs manually than it is easy wait for CI to fail. Inspired by [Scikit-learn's checklist](https://scikit-learn.org/stable/developers/contributing.html#pull-request-checklist). This is just a first draft; happy for suggestions or to add anything I'm missing.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3226/reactions"", ""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull