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 1410303926,PR_kwDOAMm_X85A3Xqk,7163,Add `eval` method to Dataset,5635139,closed,0,,,3,2022-10-15T22:12:23Z,2023-12-06T17:52:47Z,2023-12-06T17:52:46Z,MEMBER,,0,pydata/xarray/pulls/7163,"This needs proper tests & docs, but would this be a good idea? A couple of examples are in the docstring. It's mostly just deferring to pandas' excellent `eval` method. - [x] Closes #6440 (edit) - [x] Tests added - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [x] New functions/methods are listed in `api.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7163/reactions"", ""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 1}",,,13221727,pull 2019309352,PR_kwDOAMm_X85g0KvI,8493,Use numbagg for `rolling` methods,5635139,closed,0,,,3,2023-11-30T18:52:08Z,2023-12-05T19:08:32Z,2023-12-05T19:08:31Z,MEMBER,,0,pydata/xarray/pulls/8493,"A couple of tests are failing for the multi-dimensional case, which I'll fix before merge. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8493/reactions"", ""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 1, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1995489227,I_kwDOAMm_X8528L_L,8455,Errors when assigning using `.from_pandas_multiindex`,5635139,closed,0,,,3,2023-11-15T20:09:15Z,2023-12-04T19:10:12Z,2023-12-04T19:10:11Z,MEMBER,,,,"### What happened? Very possibly this is user-error, forgive me if so. I'm trying to transition some code from the previous assignment of MultiIndexes, to the new world. Here's an MCVE: ### What did you expect to happen? _No response_ ### Minimal Complete Verifiable Example ```Python da = xr.tutorial.open_dataset(""air_temperature"")['air'] # old code, works, but with a warning da.expand_dims('foo').assign_coords(foo=(pd.MultiIndex.from_tuples([(1,2)]))) :1: FutureWarning: the `pandas.MultiIndex` object(s) passed as 'foo' coordinate(s) or data variable(s) will no longer be implicitly promoted and wrapped into multiple indexed coordinates in the future (i.e., one coordinate for each multi-index level + one dimension coordinate). If you want to keep this behavior, you need to first wrap it explicitly using `mindex_coords = xarray.Coordinates.from_pandas_multiindex(mindex_obj, 'dim')` and pass it as coordinates, e.g., `xarray.Dataset(coords=mindex_coords)`, `dataset.assign_coords(mindex_coords)` or `dataarray.assign_coords(mindex_coords)`. da.expand_dims('foo').assign_coords(foo=(pd.MultiIndex.from_tuples([(1,2)]))) Out[25]: array([[[[241.2 , 242.5 , 243.5 , ..., 232.79999, 235.5 , 238.59999], ... [297.69 , 298.09 , 298.09 , ..., 296.49 , 296.19 , 295.69 ]]]], dtype=float32) Coordinates: * lat (lat) float32 75.0 72.5 70.0 67.5 65.0 ... 22.5 20.0 17.5 15.0 * lon (lon) float32 200.0 202.5 205.0 207.5 ... 325.0 327.5 330.0 * time (time) datetime64[ns] 2013-01-01 ... 2014-12-31T18:00:00 * foo (foo) object MultiIndex * foo_level_0 (foo) int64 1 * foo_level_1 (foo) int64 2 # new code — seems to get confused between the number of values in the index — 1 — and the number of levels — 3 including the parent: da.expand_dims('foo').assign_coords(foo=xr.Coordinates.from_pandas_multiindex(pd.MultiIndex.from_tuples([(1,2)]), dim='foo')) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[26], line 1 ----> 1 da.expand_dims('foo').assign_coords(foo=xr.Coordinates.from_pandas_multiindex(pd.MultiIndex.from_tuples([(1,2)]), dim='foo')) File ~/workspace/xarray/xarray/core/common.py:621, in DataWithCoords.assign_coords(self, coords, **coords_kwargs) 618 else: 619 results = self._calc_assign_results(coords_combined) --> 621 data.coords.update(results) 622 return data File ~/workspace/xarray/xarray/core/coordinates.py:566, in Coordinates.update(self, other) 560 # special case for PandasMultiIndex: updating only its dimension coordinate 561 # is still allowed but depreciated. 562 # It is the only case where we need to actually drop coordinates here (multi-index levels) 563 # TODO: remove when removing PandasMultiIndex's dimension coordinate. 564 self._drop_coords(self._names - coords_to_align._names) --> 566 self._update_coords(coords, indexes) File ~/workspace/xarray/xarray/core/coordinates.py:834, in DataArrayCoordinates._update_coords(self, coords, indexes) 832 coords_plus_data = coords.copy() 833 coords_plus_data[_THIS_ARRAY] = self._data.variable --> 834 dims = calculate_dimensions(coords_plus_data) 835 if not set(dims) <= set(self.dims): 836 raise ValueError( 837 ""cannot add coordinates with new dimensions to a DataArray"" 838 ) File ~/workspace/xarray/xarray/core/variable.py:3014, in calculate_dimensions(variables) 3012 last_used[dim] = k 3013 elif dims[dim] != size: -> 3014 raise ValueError( 3015 f""conflicting sizes for dimension {dim!r}: "" 3016 f""length {size} on {k!r} and length {dims[dim]} on {last_used!r}"" 3017 ) 3018 return dims ValueError: conflicting sizes for dimension 'foo': length 1 on and length 3 on {'lat': 'lat', 'lon': 'lon', 'time': 'time', 'foo': 'foo'} ``` ### MVCE confirmation - [X] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray. - [X] Complete example — the example is self-contained, including all data and the text of any traceback. - [X] Verifiable example — the example copy & pastes into an IPython prompt or [Binder notebook](https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/examples/blank_template.ipynb), returning the result. - [X] New issue — a search of GitHub Issues suggests this is not a duplicate. - [X] Recent environment — the issue occurs with the latest version of xarray and its dependencies. ### Relevant log output _No response_ ### Anything else we need to know? _No response_ ### Environment
INSTALLED VERSIONS ------------------ commit: None python: 3.9.18 (main, Nov 2 2023, 16:51:22) [Clang 14.0.3 (clang-1403.0.22.14.1)] python-bits: 64 OS: Darwin OS-release: 22.6.0 machine: arm64 processor: arm byteorder: little LC_ALL: en_US.UTF-8 LANG: None LOCALE: ('en_US', 'UTF-8') libhdf5: None libnetcdf: None xarray: 2023.10.2.dev10+gccc8f998 pandas: 2.1.1 numpy: 1.25.2 scipy: 1.11.1 netCDF4: None pydap: None h5netcdf: None h5py: None Nio: None zarr: 2.16.0 cftime: None nc_time_axis: None PseudoNetCDF: None iris: None bottleneck: None dask: 2023.4.0 distributed: 2023.7.1 matplotlib: 3.5.1 cartopy: None seaborn: None numbagg: 0.2.3.dev30+gd26e29e fsspec: 2021.11.1 cupy: None pint: None sparse: None flox: None numpy_groupies: 0.9.19 setuptools: 68.2.2 pip: 23.3.1 conda: None pytest: 7.4.0 mypy: 1.6.0 IPython: 8.15.0 sphinx: 4.3.2
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8455/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,not_planned,13221727,issue 2010795504,PR_kwDOAMm_X85gXOqo,8484,Fix Zarr region transpose,5635139,closed,0,,,3,2023-11-25T21:01:28Z,2023-11-27T20:56:57Z,2023-11-27T20:56:56Z,MEMBER,,0,pydata/xarray/pulls/8484,"This wasn't working on an unregion-ed write; I think because `new_var` was being lost. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8484/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1948548087,PR_kwDOAMm_X85dE9ga,8329,Request to adjust pyright config,5635139,closed,0,,,3,2023-10-18T01:04:00Z,2023-10-18T20:10:42Z,2023-10-18T20:10:41Z,MEMBER,,0,pydata/xarray/pulls/8329,"Would it be possible to not have this config? It overrides the local VS Code config, and means VS Code constantly is reporting errors for me. Totally open to other approaches ofc. Or that we decide that the tradeoff is worthwhile ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8329/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1216647336,PR_kwDOAMm_X8421oXV,6521,Move license from readme to LICENSE,5635139,open,0,,,3,2022-04-27T00:59:03Z,2023-10-01T09:31:37Z,,MEMBER,,0,pydata/xarray/pulls/6521,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6521/reactions"", ""total_count"": 3, ""+1"": 3, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1903792930,PR_kwDOAMm_X85auJN5,8215,Use `TypeVar`s rather than specific unions,5635139,closed,0,,,3,2023-09-19T22:06:13Z,2023-09-24T19:40:06Z,2023-09-24T19:40:05Z,MEMBER,,0,pydata/xarray/pulls/8215,"Also from the chars of #8208 -- this uses the TypeVars we define, which hopefully sets a standard and removes ambiguity for how to type functions. It also allows subclasses. Where possible, it uses `T_Xarray`, otherwise `T_DataArrayOrSet` where it's not possible for `mypy` to narrow the concrete type down. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8215/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1885042937,I_kwDOAMm_X85wW3j5,8157,Doc build fails on pandas docstring,5635139,closed,0,,,3,2023-09-07T03:14:25Z,2023-09-15T13:26:26Z,2023-09-15T13:26:26Z,MEMBER,,,,"### What is your issue? It looks like the doc build is [failing](https://readthedocs.org/projects/xray/builds/21845735/) on a pandas docstring: ``` /home/docs/checkouts/readthedocs.org/user_builds/xray/conda/8156/lib/python3.10/site-packages/cartopy/io/__init__.py:241: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/50m_physical/ne_50m_coastline.zip warnings.warn(f'Downloading: {url}', DownloadWarning) reading sources... [ 99%] user-guide/reshaping reading sources... [ 99%] user-guide/terminology reading sources... [ 99%] user-guide/time-series reading sources... [ 99%] user-guide/weather-climate reading sources... [100%] whats-new /home/docs/checkouts/readthedocs.org/user_builds/xray/conda/8156/lib/python3.10/site-packages/pandas/core/indexes/base.py:docstring of pandas.core.indexes.base.Index.join:14: WARNING: Inline literal start-string without end-string. /home/docs/checkouts/readthedocs.org/user_builds/xray/conda/8156/lib/python3.10/site-packages/pandas/core/indexes/base.py:docstring of pandas.core.indexes.base.Index.join:15: WARNING: Inline literal start-string without end-string. looking for now-outdated files... none found ``` (also including the cartopy warning in case that's relevant) Is this expected? Is anyone familiar enough with the doc build to know whether we can disable warnings from 3rd party modules?","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8157/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 1884999689,PR_kwDOAMm_X85ZvD67,8156,Cut middle version from CI,5635139,closed,0,,,3,2023-09-07T02:14:01Z,2023-09-07T23:19:04Z,2023-09-07T06:29:03Z,MEMBER,,0,pydata/xarray/pulls/8156,"Testing for 3.10 seems fairly low value — is there a realistic case where 3.10 would fail but 3.9 & 3.11 would pass? Merging this would cut the CI queue... ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8156/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1221918917,I_kwDOAMm_X85I1QDF,6551,Mypy workflow failing,5635139,closed,0,,,3,2022-04-30T20:53:14Z,2022-05-26T21:50:52Z,2022-05-26T21:40:01Z,MEMBER,,,,"### What is your issue? I can't work out what is causing this, and can't repro locally, though I've tried to ensure the same things are installed. The bisect is: - Passes: https://github.com/pydata/xarray/runs/6233389985?check_suite_focus=true - Fails: https://github.com/pydata/xarray/runs/6237267544?check_suite_focus=true Probably we have to skip it in the meantime, which is a shame Is there a better way of locking the dependency versions so we can rule that out? I generally don't use conda, and poetry is great at this. Is there a conda equivalent?","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6551/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 1221918339,PR_kwDOAMm_X843Hi9Y,6550,"Remove duplicate tests, v3",5635139,closed,0,,,3,2022-04-30T20:50:01Z,2022-04-30T23:22:22Z,2022-04-30T22:47:47Z,MEMBER,,0,pydata/xarray/pulls/6550,"Replaces https://github.com/pydata/xarray/pull/6541, which was using a branch in this repo, and so duplicating all the tests — which is fine but makes it difficult to understand what tests are being generated","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6550/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1117934813,I_kwDOAMm_X85ColTd,6206,Remove stable branch?,5635139,closed,0,,,3,2022-01-28T23:28:04Z,2022-01-30T22:19:08Z,2022-01-30T22:19:08Z,MEMBER,,,,"### Is your feature request related to a problem? Currently https://github.com/pydata/xarray/blob/main/HOW_TO_RELEASE.md has a few steps around the stable branch ### Describe the solution you'd like In our dev call, we discussed the possibility of using `main` in place of `stable` and removing the stable branch IIRC there's something we can do on RTD to make that replacement. (If anyone knows to hand, comment here; otherwise I can search for it). Is there anything else we need to do apart from RTD? ### Describe alternatives you've considered _No response_ ### Additional context _No response_","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6206/reactions"", ""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 1090177517,PR_kwDOAMm_X84wWcc7,6121,Change concat dims to be Hashable,5635139,closed,0,,,3,2021-12-28T23:35:14Z,2022-01-11T22:18:33Z,2022-01-10T22:13:22Z,MEMBER,,0,pydata/xarray/pulls/6121,"A small typing change ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6121/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1098449364,PR_kwDOAMm_X84wwx9F,6151,Remove numpy from mypy pre-commit,5635139,closed,0,,,3,2022-01-10T22:22:14Z,2022-01-11T15:20:08Z,2022-01-10T23:52:51Z,MEMBER,,0,pydata/xarray/pulls/6151," - [x] Seems to solve issues in https://github.com/pydata/xarray/pull/6148 ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6151/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1076348620,PR_kwDOAMm_X84vp1r4,6061,Add release note skeleton for 0.21,5635139,closed,0,,,3,2021-12-10T02:18:26Z,2021-12-22T01:10:31Z,2021-12-22T00:42:55Z,MEMBER,,0,pydata/xarray/pulls/6061,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6061/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1034285243,PR_kwDOAMm_X84tlYLw,5890,Blacken notebooks,5635139,closed,0,,,3,2021-10-23T23:38:23Z,2021-10-24T00:29:40Z,2021-10-24T00:12:10Z,MEMBER,,0,pydata/xarray/pulls/5890," - [x] Passes `pre-commit run --all-files` The new version of black formats notebook files too, so I was getting diffs when doing other work. This should let us upgrade black in pre-commit when that comes out","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5890/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 987378623,MDExOlB1bGxSZXF1ZXN0NzI2NDczMDA1,5761,Fix pyi / py issue in mypy ,5635139,closed,0,,,3,2021-09-03T04:11:31Z,2021-09-13T00:28:50Z,2021-09-13T00:03:35Z,MEMBER,,0,pydata/xarray/pulls/5761," - [x] Closes https://github.com/pydata/xarray/issues/5755 - [x] Passes `pre-commit run --all-files` - [ ] New functions/methods are listed in `api.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5761/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 976214874,MDExOlB1bGxSZXF1ZXN0NzE3MjA0NTU4,5729,Xfail failing test on main,5635139,closed,0,,,3,2021-08-21T20:22:31Z,2021-08-21T23:36:24Z,2021-08-21T22:34:08Z,MEMBER,,0,pydata/xarray/pulls/5729," ref https://github.com/pydata/xarray/issues/5654 I vote to always do this when a dependency changes, if we can't immediately fix the code. Having main be green means it's easy to see the difference between passing and failing.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5729/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 967945936,MDExOlB1bGxSZXF1ZXN0NzEwMDkyMzU3,5695,Use isort's float-to-top,5635139,closed,0,,,3,2021-08-12T03:30:27Z,2021-08-19T05:35:40Z,2021-08-19T05:12:38Z,MEMBER,,0,pydata/xarray/pulls/5695," - [x] Closes https://github.com/pydata/xarray/issues/5675 - [x] Passes `pre-commit run --all-files` - [ ] New functions/methods are listed in `api.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5695/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 522562906,MDExOlB1bGxSZXF1ZXN0MzQwNzQwNjE2,3529,Deprecation warning in _replace_vars_and_dims,5635139,closed,0,,,3,2019-11-14T01:09:34Z,2021-05-13T22:01:45Z,2021-05-13T22:01:45Z,MEMBER,,0,pydata/xarray/pulls/3529,"& removed internal usages - [x] Passes `black . && mypy . && flake8` - [x] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API I needed to pass `indexes=None` from some of the existing methods that were using the deprecated method. I spent some time debugging but couldn't work out the causality. I added TODOs as part of the index work.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3529/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 874038993,MDExOlB1bGxSZXF1ZXN0NjI4NjczNDg5,5245,xfail very flaky test,5635139,closed,0,,,3,2021-05-02T20:39:10Z,2021-05-03T04:29:24Z,2021-05-03T04:29:21Z,MEMBER,,0,pydata/xarray/pulls/5245," This consistently fails. In general I think as soon as we see this happening, we should either fix immediately (but probably not that easy) or xfail it and if necessary open an issue. That keeps the main branch green, such that we can reliably use passing tests as an indicator of PRs. Though as ever, very open to other thoughts. There's a reasonable argument that ""keeping master green by removing any failing tests is missing the point a bit""...","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5245/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 862107086,MDExOlB1bGxSZXF1ZXN0NjE4NzExMjQ2,5191,Remove final raises_regexes,5635139,closed,0,,,3,2021-04-19T23:31:05Z,2021-04-21T19:04:00Z,2021-04-21T17:14:05Z,MEMBER,,0,pydata/xarray/pulls/5191," - [x] Passes `pre-commit run --all-files` - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` ~All apart from [this issue](https://github.com/pydata/xarray/pull/5188#issuecomment-822826163), which is a puzzle. It would be great to remove the function, which requires solving that puzzle!~ Hacked around it, somewhat unsatisfactorily. But no need to delay this issue because of it.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5191/reactions"", ""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 860577067,MDExOlB1bGxSZXF1ZXN0NjE3NDIzNTQy,5184,"Enable clip broadcasting, with apply_ufunc",5635139,closed,0,,,3,2021-04-18T05:17:33Z,2021-04-21T17:39:11Z,2021-04-21T17:39:08Z,MEMBER,,0,pydata/xarray/pulls/5184," - [x] Closes https://github.com/pydata/xarray/issues/5173 - [x] Tests added - [x] Passes `pre-commit run --all-files` - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [x] Add docstring - [x] Confirm apply_ufunc args, like join I think this is the right approach — we may need to confirm the appropriate args to `apply_ufunc` — probably we want the same as `.where`? Tests are OK but a bit lacking atm.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5184/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 515106795,MDExOlB1bGxSZXF1ZXN0MzM0NjE5ODE2,3472,Type check sentinel values,5635139,closed,0,,,3,2019-10-31T02:15:57Z,2021-04-19T06:10:36Z,2019-10-31T15:52:02Z,MEMBER,,0,pydata/xarray/pulls/3472," - [ ] Closes #xxxx - [ ] Passes `black . && mypy . && flake8` - [ ] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API I did this before I realized it only works on mypy master! But posting so no one else does it. We can wait to merge until the next version of mypy is out","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3472/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 815845314,MDExOlB1bGxSZXF1ZXN0NTc5NjA3MzQ4,4953,Add 0.17.0 release notes,5635139,closed,0,,,3,2021-02-24T21:01:17Z,2021-02-25T00:54:53Z,2021-02-25T00:54:45Z,MEMBER,,0,pydata/xarray/pulls/4953,"Let me know any changes here, fairly soon if possible! And please make changes liberally — what are the important features we should highlight in the heading? Thanks","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4953/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 705185498,MDExOlB1bGxSZXF1ZXN0NDg5OTU4NDE4,4443,Fix release notes formatting,5635139,closed,0,,,3,2020-09-20T21:02:04Z,2020-09-22T02:05:33Z,2020-09-20T23:31:39Z,MEMBER,,0,pydata/xarray/pulls/4443," As per https://github.com/pydata/xarray/pull/4440 ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4443/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 703991403,MDExOlB1bGxSZXF1ZXN0NDg4OTk2Njk3,4433,Clearer Vectorized Indexing example,5635139,closed,0,,,3,2020-09-18T00:21:33Z,2020-09-18T18:36:36Z,2020-09-18T15:23:33Z,MEMBER,,0,pydata/xarray/pulls/4433," - [x] Passes `isort . && black . && mypy . && flake8` - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` I found the existing example not that clear as to why it was selecting `[[1,1],[5,5]]`, I think this is more obvious (open to disagreement of course!) Before ```python In [37]: da = xr.DataArray( ....: np.arange(12).reshape((3, 4)), ....: dims=[""x"", ""y""], ....: coords={""x"": [0, 1, 2], ""y"": [""a"", ""b"", ""c"", ""d""]}, ....: ) ....: In [38]: da Out[38]: array([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11]]) Coordinates: * x (x) int64 0 1 2 * y (y) array([[1, 1], [5, 5]]) Coordinates: * x (x) int64 0 1 * y (y) array([[ 4, 7], [ 8, 11], [ 8, 11]]) Coordinates: * x (x) int64 1 2 2 * y (y) - [x] Fixes #3760 - [x] Tests added - [x] Passes `isort -rc . && black . && mypy . && flake8` - [x] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3905/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 587197693,MDExOlB1bGxSZXF1ZXN0MzkzMTkwMDIy,3886,Use `fixes` in PR template,5635139,closed,0,,,3,2020-03-24T18:37:06Z,2020-03-28T19:50:12Z,2020-03-24T18:48:36Z,MEMBER,,0,pydata/xarray/pulls/3886," `Closes` doesn't seem to add the issue to ""Linked Issues"" and auto-close. `Fixes` works elsewhere.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3886/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 587099341,MDExOlB1bGxSZXF1ZXN0MzkzMTA2MjY5,3885,xfail test_uamiv_format_write,5635139,closed,0,,,3,2020-03-24T16:32:42Z,2020-03-24T19:24:45Z,2020-03-24T19:24:42Z,MEMBER,,0,pydata/xarray/pulls/3885," - [x] Triages https://github.com/pydata/xarray/issues/3711 ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3885/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 575080574,MDU6SXNzdWU1NzUwODA1NzQ=,3825,Accept lambda in methods with one obvious xarray argument,5635139,closed,0,,,3,2020-03-04T01:52:46Z,2020-03-20T17:14:20Z,2020-03-20T17:14:20Z,MEMBER,,,,"Branching from https://github.com/pydata/xarray/issues/3770 Here's the proposal: allow lambdas on methods where the primary argument is a single xarray object, and interpret lambas as though they'd be supplied in a `pipe` method followed by the current method. Taking the example from the linked issue: ```python In [1]: import xarray as xr In [2]: import numpy as np In [3]: da = xr.DataArray(np.random.rand(2,3)) In [4]: da.where(da > 0.5) Out[4]: array([[ nan, 0.71442406, nan], [0.55748705, nan, nan]]) Dimensions without coordinates: dim_0, dim_1 # this should be equivalent (currently not valid) In [5]: da.where(lambda x: x > 0.5) # the longer version (currently works) In [5]: da.pipe(lambda x: x.where(x > 0.5)) ``` Others I miss from pandas: `assign`, and `loc`. I haven't gone through the list though assume there are others; we don't have to agree 100% on the list before starting with the most obvious ones, assuming we're in agreement with the principle.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3825/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 584709888,MDExOlB1bGxSZXF1ZXN0MzkxMjQ1NzI2,3870,Fix html repr on non-str keys,5635139,closed,0,,,3,2020-03-19T21:26:36Z,2020-03-20T17:04:30Z,2020-03-20T17:04:26Z,MEMBER,,0,pydata/xarray/pulls/3870," - [x] Closes https://github.com/pydata/xarray/issues/3833 - [x] Tests added - [x] Passes `isort -rc . && black . && mypy . && flake8` - [x] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3870/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 521314473,MDExOlB1bGxSZXF1ZXN0MzM5NzE2MDA4,3511,Format some of the docs code,5635139,closed,0,,,3,2019-11-12T04:00:23Z,2019-11-12T16:04:50Z,2019-11-12T04:31:39Z,MEMBER,,0,pydata/xarray/pulls/3511,"I struggled to parse some of the code in the docs, and so formatted some of the hardest-to-read code (e.g. ` mask = (ds.coords['lat']>20)&(ds.coords['lat']<60)&(ds.coords['lon']>220)&(ds.coords['lon']<260) `!) with black. I'm not sure whether there's a more automated solution for this? On a related point, I'm not sure why some of the code examples are colorized and some are B&W? I couldn't see anything obvious in the rst. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3511/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 469983439,MDU6SXNzdWU0Njk5ODM0Mzk=,3144,h5py raising on xr.show_versions(),5635139,closed,0,,,3,2019-07-18T20:51:26Z,2019-07-20T06:18:48Z,2019-07-20T06:18:48Z,MEMBER,,,,"Any ideas why `__hdf5libversion__` wouldn't be available? Shall I put a try / except around it? ```python In [4]: import xarray as xr In [5]: xr.show_versions() --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) /usr/local/lib/python3.7/site-packages/xarray/util/print_versions.py in netcdf_and_hdf5_versions() 64 try: ---> 65 import netCDF4 66 libhdf5_version = netCDF4.__hdf5libversion__ ModuleNotFoundError: No module named 'netCDF4' During handling of the above exception, another exception occurred: AttributeError Traceback (most recent call last) in ----> 1 xr.show_versions() /usr/local/lib/python3.7/site-packages/xarray/util/print_versions.py in show_versions(file) 78 sys_info = get_sys_info() 79 ---> 80 sys_info.extend(netcdf_and_hdf5_versions()) 81 82 deps = [ /usr/local/lib/python3.7/site-packages/xarray/util/print_versions.py in netcdf_and_hdf5_versions() 69 try: 70 import h5py ---> 71 libhdf5_version = h5py.__hdf5libversion__ 72 except ImportError: 73 pass AttributeError: module 'h5py' has no attribute '__hdf5libversion__' ``` I check I'm on the latest h5py: ``` pip install h5py -U Thu Jul 18 16:47:29 2019 Requirement already up-to-date: h5py in ./Library/Python/3.7/lib/python/site-packages (2.9.0) Requirement already satisfied, skipping upgrade: numpy>=1.7 in /usr/local/lib/python3.7/site-packages (from h5py) (1.16.4) Requirement already satisfied, skipping upgrade: six in ./Library/Python/3.7/lib/python/site-packages (from h5py) (1.12.0) ```","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3144/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 448312915,MDExOlB1bGxSZXF1ZXN0MjgyMTI2ODUz,2988,Remove deprecated pytest.config usages,5635139,closed,0,,,3,2019-05-24T19:00:11Z,2019-06-14T23:06:46Z,2019-05-25T02:01:32Z,MEMBER,,0,pydata/xarray/pulls/2988," - [x] Tests added - [x] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API I need to confirm whether this works with an installed version of xarray, because of https://github.com/pytest-dev/pytest/issues/1596. If pytest doesn't pick up this config, it will run all tests, because the default is to not skip. I know I've generally been the point person for pytest - let me know if anyone has an immediate solution for this though","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2988/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 454787521,MDExOlB1bGxSZXF1ZXN0Mjg3MTY4Mjk0,3016,Pandas labels deprecation,5635139,closed,0,,,3,2019-06-11T16:24:43Z,2019-06-12T00:49:31Z,2019-06-11T22:58:26Z,MEMBER,,0,pydata/xarray/pulls/3016,Should I still add a `whatsnew`? It's very small and very internal,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3016/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 423493491,MDExOlB1bGxSZXF1ZXN0MjYzMDU0Nzk4,2832,Small fix: use == to compare strings,5635139,closed,0,,,3,2019-03-20T22:04:39Z,2019-03-23T21:30:22Z,2019-03-22T01:12:51Z,MEMBER,,0,pydata/xarray/pulls/2832,"`is` relies on interning, which is almost always OK for small strings, but reliant on language implementations (unless there's something I'm missing about `.kind`?)","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2832/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 170305429,MDU6SXNzdWUxNzAzMDU0Mjk=,957,BUG: Repr on inherited classes is incorrect,5635139,closed,0,,,3,2016-08-10T00:58:46Z,2019-02-26T01:28:23Z,2019-02-26T01:28:23Z,MEMBER,,,,"This is extremely minor, I generally wouldn't report it. We're using classes inherited from `Dataset` more & more - this works really well for classes with a lot of array-like properties that can be aligned, and allows `@property` to lazily compute some calcs. (any feedback on this approach very welcome) The top of the repr is incorrect ``` python Dimensions: (date: 6647, security: 285, sub_measure: 4) Coordinates: ... ``` Could just be the qualified name. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/957/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 393978873,MDExOlB1bGxSZXF1ZXN0MjQwODQzOTk2,2632,Add flake check to travis,5635139,closed,0,,,3,2018-12-25T07:36:38Z,2018-12-30T06:26:26Z,2018-12-30T00:10:17Z,MEMBER,,0,pydata/xarray/pulls/2632," - [x] Closes https://github.com/pydata/xarray/issues/2627 ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2632/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 314241348,MDU6SXNzdWUzMTQyNDEzNDg=,2056,Warning on supplying a Dataset to the Dataset constructor,5635139,closed,0,,,3,2018-04-13T20:31:12Z,2018-11-07T15:40:49Z,2018-11-07T15:40:49Z,MEMBER,,,,"```python In [1]: import xarray as xr In [3]: ds=xr.Dataset({'a':xr.DataArray([1,2,3])}) In [4]: xr.Dataset(ds) /Users/maximilian/drive/workspace/xarray/xarray/core/dataset.py:373: FutureWarning: iteration over an xarray.Dataset will change in xarray v0.11 to only include data variables, not coordinates. Iterate over the Dataset.variables property instead to preserve existing behavior in a forwards compatible manner. both_data_and_coords = [k for k in data_vars if k in coords] Out[4]: Dimensions: (dim_0: 3) Dimensions without coordinates: dim_0 Data variables: a (dim_0) int64 1 2 3 ``` #### Problem description Currently we run `both_data_and_coords = [k for k in data_vars if k in coords]`, where `data_vars` is the first arg to the constructor. So, when `data_vars` is a `Dataset`, we'll raise a warning. More importantly: this raises the question of how we should handle `xr.Dataset(ds)` Currently we retain the `coords`, but discard `attrs`. That seems arbitrary? I'd have to check, but when we change `__iter__` to only reference `data_vars`, we may also discard `coords` I don't have a strong view. If you think that `Foo(foo)` should always return `foo` (which is often the case in pandas), then we should retain the full object. If you think that `foo` is supplied to the `data_vars` arg, then retaining only the `data_vars` seems reasonable #### Expected Output #### Output of ``xr.show_versions()``
INSTALLED VERSIONS ------------------ commit: a9d1f3a36229636f0d519eb36a8d4a7c91f6e1cd python: 3.6.5.final.0 python-bits: 64 OS: Darwin OS-release: 17.4.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 xarray: 0.10.2+dev31.g0a24429 pandas: 0.22.0 numpy: 1.14.2 scipy: 1.0.0 netCDF4: None h5netcdf: None h5py: None Nio: None zarr: None bottleneck: 1.2.1 cyordereddict: None dask: 0.17.2 distributed: None matplotlib: 2.1.2 cartopy: None seaborn: 0.8.1 setuptools: 39.0.1 pip: 9.0.3 conda: None pytest: 3.5.0 IPython: 6.3.0 sphinx: None
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2056/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 366510937,MDU6SXNzdWUzNjY1MTA5Mzc=,2460,Update docs to include how to Join using a non-index coord,5635139,open,0,5635139,,3,2018-10-03T20:19:15Z,2018-11-01T15:37:44Z,,MEMBER,,,,"I originally posted this on [SO](https://stackoverflow.com/questions/52625974/join-using-a-non-index-coord-in-xarray), as I thought it was a user question rather than a library issue. But after working on it more today, I'm not so sure. I'm trying to do a 'join' in xarray, but using a non-index coordinate rather than a shared dim. I have a Dataset indexed on 'a' with a coord on 'b', and a DataArray indexed on 'b': ```python In [17]: ds=xr.Dataset(dict(a=(('x'),np.random.rand(10))), coords=dict(b=(('x'),list(range(10))))) In [18]: ds Out[18]: Dimensions: (x: 10) Coordinates: b (x) int64 0 1 2 3 4 5 6 7 8 9 Dimensions without coordinates: x Data variables: a (x) float64 0.3634 0.2132 0.6945 0.5359 0.1053 0.07045 0.5945 ... In [19]: da=xr.DataArray(np.random.rand(10), dims=('b',), coords=dict(b=(('b'),list(range(10))))) In [20]: da Out[20]: array([0.796987, 0.275992, 0.747882, 0.240374, 0.435143, 0.285271, 0.753582, 0.556038, 0.365889, 0.434844]) Coordinates: * b (b) int64 0 1 2 3 4 5 6 7 8 9 ``` Can I add da onto my dataset, by joining on ds.b equalling da.b? The result would be: ```python Dimensions: (x: 10) Coordinates: b (x) int64 0 1 2 3 4 5 6 7 8 9 Dimensions without coordinates: x Data variables: a (x) float64 0.3634 0.2132 0.6945 0.5359 0.1053 0.07045 0.5945 ... da (x) float64 0.796987, 0.275992, 0.747882, 0.240374, 0.435143 ... ``` (for completeness - the data isn't current in the correct position)","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2460/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 373588302,MDExOlB1bGxSZXF1ZXN0MjI1NDg0MDk2,2506,Iterate over data_vars only,5635139,closed,0,,,3,2018-10-24T17:14:50Z,2018-10-25T15:27:03Z,2018-10-25T15:26:59Z,MEMBER,,0,pydata/xarray/pulls/2506," - [x] Closes #884 (remove if there is no corresponding issue, which should only be the case for minor changes) - [x] Tests added (for all bug fixes or enhancements) - [ ] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API (remove if this change should not be visible to users, e.g., if it is an internal clean-up, or if this is part of a larger project that will be documented later) ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2506/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 334942760,MDExOlB1bGxSZXF1ZXN0MTk2Nzg2ODQ4,2246,Small error in open_zarr docs,5635139,closed,0,,,3,2018-06-22T16:30:14Z,2018-06-22T22:57:50Z,2018-06-22T22:00:06Z,MEMBER,,0,pydata/xarray/pulls/2246,"I tried setting this up on GCS as an experiment, and found there's no `mode` kwarg to `open_zarr`. I'm not sure whether there are broader issues but thought I'd put this in regardless (also - if anyone has any experience in deploying xarray over https://github.com/dask/dask-kubernetes and GCS, I'd be interested in your experience. We're currently working with either a) BigQuery for big data or b) in-memory xarray for small data, and I was interested whether there's a way of retaining the xarray model for bigger data without too much overhead)","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2246/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 115970964,MDU6SXNzdWUxMTU5NzA5NjQ=,651,DOC: minor break in doc build?,5635139,closed,0,,,3,2015-11-09T21:30:01Z,2017-12-10T02:30:12Z,2017-12-10T02:30:12Z,MEMBER,,,,"http://xray.readthedocs.org/en/stable/generated/xray.DataArray.count.html `name` doesn't seem to be working correctly: ``` Dimension(s) over which to apply {name}. ``` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/651/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 122384593,MDU6SXNzdWUxMjIzODQ1OTM=,680,Shorter repr for DataArrays with many coordinates & dims,5635139,closed,0,,,3,2015-12-15T22:44:32Z,2017-01-21T03:32:12Z,2017-01-21T03:32:12Z,MEMBER,,,,"This is the `repr` for a DataArray with 7 coordinates and 5 dimensions. Do we agree this should be shorter? ``` python array([[[[[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]], [[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]], [[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]], [[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]], [[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]]], [[[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]], [[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]], [[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]], [[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]], [[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]]]], [[[[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]], [[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]], [[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]], [[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]], [[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]]], [[[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]], [[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]], [[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]], [[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]], [[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]]]]]) Coordinates: ... ``` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/680/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 196844801,MDExOlB1bGxSZXF1ZXN0OTg4NzEwMzg=,1175,End support for py3.3?,5635139,closed,0,,,3,2016-12-21T04:42:38Z,2016-12-21T06:21:16Z,2016-12-21T06:21:16Z,MEMBER,,0,pydata/xarray/pulls/1175,"Even at the beginning of this year its downloads were 90% lower than 2.6: https://hynek.me/articles/python3-2016/ Impetus is that pytest no longer supports it, and some of the tests I recently wrote don't work on 3.3","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/1175/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 154818715,MDU6SXNzdWUxNTQ4MTg3MTU=,847,Dataset constructor fails if values are objects,5635139,closed,0,,,3,2016-05-13T23:27:50Z,2016-08-12T06:06:18Z,2016-08-12T06:06:18Z,MEMBER,,,,"For an item to be a value in a Dataset, it either needs to be array-like, or pass `lib.is_scalar`. I think this is probably too strict - I'd propose anything can be a value, and it only gets treated as an array if it looks like one - thoughts? Here's the code that checks the values: https://github.com/pydata/xarray/blob/master/xarray/core/variable.py#L52 ``` python In [13]: class B(object): pass ....: In [14]: xr.Dataset({'a':B()}) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) in () ----> 1 xr.Dataset({'a':B()}) /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/xarray/core/dataset.py in __init__(self, data_vars, coords, attrs, compat, **kwargs) 207 coords = set() 208 if data_vars is not None or coords is not None: --> 209 self._set_init_vars_and_dims(data_vars, coords, compat) 210 if attrs is not None: 211 self.attrs = attrs /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/xarray/core/dataset.py in _set_init_vars_and_dims(self, vars, coords, compat) 258 aligned = align_variables(variables) 259 new_variables, new_coord_names = expand_variables(aligned, --> 260 compat=compat) 261 262 new_coord_names.update(coords) /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/xarray/core/merge.py in expand_variables(raw_variables, old_variables, compat) 75 add_variable(dim, coord.variable) 76 var = var.variable ---> 77 add_variable(name, var) 78 79 return new_variables, new_coord_names /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/xarray/core/merge.py in add_variable(name, var) 55 56 def add_variable(name, var): ---> 57 var = _as_dataset_variable(name, var) 58 if name not in variables: 59 variables[name] = var /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/xarray/core/merge.py in _as_dataset_variable(name, var) 9 """""" 10 try: ---> 11 var = as_variable(var, key=name) 12 except TypeError: 13 raise TypeError('variables must be given by arrays or a tuple of ' /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/xarray/core/variable.py in as_variable(obj, key, strict, copy) 55 obj = Variable(obj.name, obj) 56 elif key is not None: ---> 57 obj = Variable(key, obj) 58 else: 59 raise TypeError('cannot infer Variable dimensions') /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/xarray/core/variable.py in __init__(self, dims, data, attrs, encoding, fastpath) 211 """""" 212 self._data = as_compatible_data(data, fastpath=fastpath) --> 213 self._dims = self._parse_dimensions(dims) 214 self._attrs = None 215 self._encoding = None /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/xarray/core/variable.py in _parse_dimensions(self, dims) 319 raise ValueError('dimensions %s must have the same length as the ' 320 'number of data dimensions, ndim=%s' --> 321 % (dims, self.ndim)) 322 return dims 323 ValueError: dimensions ('a',) must have the same length as the number of data dimensions, ndim=0 ``` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/847/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 160466764,MDU6SXNzdWUxNjA0NjY3NjQ=,883,ENH: Allow ds selection with callable?,5635139,closed,0,,,3,2016-06-15T16:31:35Z,2016-08-02T17:51:43Z,2016-08-02T17:51:43Z,MEMBER,,,,"Inspired by: https://github.com/pydata/xarray/pull/844. This is a more general case for variable selection. We could allow a selection of variables with a callable, similar (but not the same) as pandas' implementation: ``` python In [5]: ds=xr.Dataset({'a': (('x', 'y'), np.random.rand(10,2))}) Out[4]: Dimensions: (x: 10, y: 2) Coordinates: * x (x) int64 0 1 2 3 4 5 6 7 8 9 * y (y) int64 0 1 Data variables: a (x, y) float64 0.5819 0.1214 0.2645 0.9053 0.6968 0.1608 0.3199 ... In [9]: ds['a'].attrs['clean'] = True # potentially: In [10]: ds[lambda x: x.attrs['clean']] #... would return ds['a'] ``` This would mean functions wouldn't be able to be dataset keys - I don't think that's a big issue, but could arise with callable classes, for example. Another option would be a `.filter` / `.select` method or indexer. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/883/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 156073920,MDU6SXNzdWUxNTYwNzM5MjA=,853,TST: Py.test,5635139,closed,0,,,3,2016-05-21T00:34:59Z,2016-05-24T19:24:44Z,2016-05-24T19:24:44Z,MEMBER,,,,"What do we think about switching to py.test? Current tests pass with py.test. Then we can use its features for new tests, while the old ones will continue working. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/853/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 131219763,MDExOlB1bGxSZXF1ZXN0NTgyMzMzMTg=,746,BUG: Don't transpose variables of one dimension,5635139,closed,0,,,3,2016-02-04T02:29:06Z,2016-02-09T16:46:40Z,2016-02-09T16:05:28Z,MEMBER,,0,pydata/xarray/pulls/746,"Resolves https://github.com/pydata/xarray/issues/745 A bit of a 'convenient hack'. Let me know if you think there's a better way to do this ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/746/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 124578622,MDExOlB1bGxSZXF1ZXN0NTQ5MDIzNTk=,698,Allow empty DataFrame in Dataset construction,5635139,closed,0,,,3,2016-01-02T07:01:58Z,2016-01-02T07:34:42Z,2016-01-02T07:26:29Z,MEMBER,,0,pydata/xarray/pulls/698,"Closes https://github.com/xray/xray/issues/697 @shoyer: am I missing something as to why the special case was there? ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/698/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 120513074,MDExOlB1bGxSZXF1ZXN0NTI3Mzg3NTQ=,671,Align pandas objects with named indexes,5635139,closed,0,,,3,2015-12-05T00:20:41Z,2015-12-10T22:38:33Z,2015-12-08T07:23:41Z,MEMBER,,0,pydata/xarray/pulls/671,"closes https://github.com/xray/xray/issues/664. What's new & docs forthcoming ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/671/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 118156114,MDU6SXNzdWUxMTgxNTYxMTQ=,664,Align pandas objects added to Datasets?,5635139,closed,0,,,3,2015-11-21T00:37:47Z,2015-12-08T07:23:41Z,2015-12-08T07:23:41Z,MEMBER,,,,"We have a pandas DataFrame which is not aligned on an xray Dataset: ``` python In [34]: da = xray.DataArray( np.random.rand(5,2), coords=( ('date', pd.date_range(start='2000', periods=5)), ('company', list('ab')), ) ) da Out[34]: array([[ 0.82168647, 0.93097023], [ 0.34928855, 0.23245631], [ 0.32857461, 0.12554705], [ 0.44983381, 0.27182767], [ 0.31063147, 0.52894834]]) Coordinates: * date (date) datetime64[ns] 2000-01-01 2000-01-02 2000-01-03 ... * company (company) |S1 'a' 'b' In [35]: ds = xray.Dataset({'returns': da}) ds Out[35]: Dimensions: (company: 2, date: 5) Coordinates: * date (date) datetime64[ns] 2000-01-01 2000-01-02 2000-01-03 ... * company (company) |S1 'a' 'b' Data variables: returns (date, company) float64 0.8217 0.931 0.3493 0.2325 0.3286 ... In [36]: df=da.to_pandas() df Out[36]: company a b date 2000-01-01 0.821686 0.930970 2000-01-02 0.349289 0.232456 2000-01-03 0.328575 0.125547 2000-01-04 0.449834 0.271828 2000-01-05 0.310631 0.528948 In [41]: rank rank = df.rank() rank Out[41]: company a b date 2000-01-01 5 5 2000-01-02 3 2 2000-01-03 2 1 2000-01-04 4 3 2000-01-05 1 4 In [42]: rank=rank.reindex(columns=list('ba')) rank Out[42]: company b a date 2000-01-01 5 5 2000-01-02 2 3 2000-01-03 1 2 2000-01-04 3 4 2000-01-05 4 1 ``` When we add it to a Dataset, it ignores the index on the columns: ``` python In [49]: ds['rank'] = (('date','company'),rank) ds['rank'].to_pandas() Out[49]: company a b date 2000-01-01 5 5 2000-01-02 2 3 2000-01-03 1 2 2000-01-04 3 4 2000-01-05 4 1 ``` And adding the DataFrame without supplying dims doesn't work. One solution, is to construct a DataArray out of the pandas object: ``` python In [45]: ds['rank'] = xray.DataArray(rank) ds Out[45]: Dimensions: (company: 2, date: 5) Coordinates: * date (date) datetime64[ns] 2000-01-01 2000-01-02 2000-01-03 ... * company (company) object 'a' 'b' Data variables: returns (date, company) float64 0.8217 0.931 0.3493 0.2325 0.3286 ... rank (date, company) float64 5.0 5.0 3.0 2.0 2.0 1.0 4.0 3.0 1.0 4.0 ``` Possible additions to make this easier: - Align pandas objects that are passed in, when dims are supplied - Allow adding pandas objects to Datasets with labelled axes without supplying dims, and align those (similar to wrapping them in a DataArray constructor) What are your thoughts? ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/664/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue