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
2261844699,PR_kwDOAMm_X85toeXT,8968,Bump dependencies incl `pandas>=2`,2448579,closed,0,,,0,2024-04-24T17:42:19Z,2024-04-27T14:17:16Z,2024-04-27T14:17:16Z,MEMBER,,0,pydata/xarray/pulls/8968,"
- [ ] Closes #xxxx
- [ ] Tests added
- [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
- [ ] New functions/methods are listed in `api.rst`
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8968/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2228266052,PR_kwDOAMm_X85r24hE,8913,Update hypothesis action to always save the cache,2448579,closed,0,,,0,2024-04-05T15:09:35Z,2024-04-05T16:51:05Z,2024-04-05T16:51:03Z,MEMBER,,0,pydata/xarray/pulls/8913,Update the cache always.,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8913/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2136709010,I_kwDOAMm_X85_W5eS,8753,Lazy Loading with `DataArray` vs. `Variable`,2448579,closed,0,,,0,2024-02-15T14:42:24Z,2024-04-04T16:46:54Z,2024-04-04T16:46:54Z,MEMBER,,,,"### Discussed in https://github.com/pydata/xarray/discussions/8751
Originally posted by **ilan-gold** February 15, 2024
My goal is to get a dataset from [custom io-zarr backend lazy-loaded](https://docs.xarray.dev/en/stable/internals/how-to-add-new-backend.html#how-to-support-lazy-loading). But when I declare a `DataArray` based on the `Variable` which uses `LazilyIndexedArray`, everything is read in. Is this expected? I specifically don't want to have to use dask if possible. I have seen https://github.com/aurghs/xarray-backend-tutorial/blob/main/2.Backend_with_Lazy_Loading.ipynb but it's a little bit different.
While I have a custom backend array inheriting from `ZarrArrayWrapper`, this example using `ZarrArrayWrapper` directly still highlights the same unexpected behavior of everything being read in.
```python
import zarr
import xarray as xr
from tempfile import mkdtemp
import numpy as np
from pathlib import Path
from collections import defaultdict
class AccessTrackingStore(zarr.DirectoryStore):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._access_count = {}
self._accessed = defaultdict(set)
def __getitem__(self, key):
for tracked in self._access_count:
if tracked in key:
self._access_count[tracked] += 1
self._accessed[tracked].add(key)
return super().__getitem__(key)
def get_access_count(self, key):
return self._access_count[key]
def set_key_trackers(self, keys_to_track):
if isinstance(keys_to_track, str):
keys_to_track = [keys_to_track]
for k in keys_to_track:
self._access_count[k] = 0
def get_subkeys_accessed(self, key):
return self._accessed[key]
orig_path = Path(mkdtemp())
z = zarr.group(orig_path / ""foo.zarr"")
z['array'] = np.random.randn(1000, 1000)
store = AccessTrackingStore(orig_path / ""foo.zarr"")
store.set_key_trackers(['array'])
z = zarr.group(store)
arr = xr.backends.zarr.ZarrArrayWrapper(z['array'])
lazy_arr = xr.core.indexing.LazilyIndexedArray(arr)
# just `.zarray`
var = xr.Variable(('x', 'y'), lazy_arr)
print('Variable read in ', store.get_subkeys_accessed('array'))
# now everything is read in
da = xr.DataArray(var)
print('DataArray read in ', store.get_subkeys_accessed('array'))
```
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8753/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue
2224300175,PR_kwDOAMm_X85rpG4S,8907,Trigger hypothesis stateful tests nightly,2448579,closed,0,,,0,2024-04-04T02:16:59Z,2024-04-04T02:17:49Z,2024-04-04T02:17:47Z,MEMBER,,0,pydata/xarray/pulls/8907,"
- [ ] Closes #xxxx
- [ ] Tests added
- [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
- [ ] New functions/methods are listed in `api.rst`
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8907/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2000205407,PR_kwDOAMm_X85fzupc,8467,[skip-ci] dev whats-new,2448579,closed,0,,,0,2023-11-18T03:59:29Z,2024-04-03T21:08:45Z,2023-11-18T15:20:37Z,MEMBER,,0,pydata/xarray/pulls/8467,"
- [ ] Closes #xxxx
- [ ] Tests added
- [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
- [ ] New functions/methods are listed in `api.rst`
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8467/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1989233637,PR_kwDOAMm_X85fOdAk,8446,Remove PseudoNetCDF,2448579,closed,0,,,0,2023-11-12T04:29:50Z,2024-04-03T21:08:44Z,2023-11-13T21:53:56Z,MEMBER,,0,pydata/xarray/pulls/8446,"joining the party
- [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8446/reactions"", ""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 1, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2102850331,PR_kwDOAMm_X85lMW8k,8674,Fix negative slicing of Zarr arrays,2448579,closed,0,,,0,2024-01-26T20:22:21Z,2024-04-03T21:08:26Z,2024-02-10T02:57:32Z,MEMBER,,0,pydata/xarray/pulls/8674,"Closes #8252
Closes #3921
- [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8674/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2148245262,PR_kwDOAMm_X85nmmqX,8777,Return a dataclass from Grouper.factorize,2448579,closed,0,,,0,2024-02-22T05:41:29Z,2024-04-03T21:08:25Z,2024-03-15T04:47:30Z,MEMBER,,0,pydata/xarray/pulls/8777,"Toward #8510, builds on #8776","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8777/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2148164557,PR_kwDOAMm_X85nmU5w,8775,[skip-ci] NamedArray: Add lazy indexing array refactoring plan,2448579,closed,0,,,0,2024-02-22T04:25:49Z,2024-04-03T21:08:21Z,2024-02-23T22:20:09Z,MEMBER,,0,pydata/xarray/pulls/8775,"This adds a proposal for decoupling the lazy indexing array machinery, indexing adapter machinery, and Variable's setitem and getitem methods, so that the latter can be migrated to NamedArray.
cc @andersy005 ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8775/reactions"", ""total_count"": 2, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 2, ""eyes"": 0}",,,13221727,pull
2198991054,PR_kwDOAMm_X85qTNFP,8861,upstream-dev CI: Fix interp and cumtrapz,2448579,closed,0,,,0,2024-03-21T02:49:40Z,2024-04-03T21:08:17Z,2024-03-21T04:16:45Z,MEMBER,,0,pydata/xarray/pulls/8861,"
- [x] xref #8844
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8861/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2215539648,PR_kwDOAMm_X85rLW_p,8891,2024.03.0: Add whats-new,2448579,closed,0,,,0,2024-03-29T15:01:35Z,2024-03-29T17:07:19Z,2024-03-29T17:07:17Z,MEMBER,,0,pydata/xarray/pulls/8891,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8891/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2206047573,PR_kwDOAMm_X85qrHyn,8875,Optimize writes to existing Zarr stores.,2448579,closed,0,,,0,2024-03-25T15:32:47Z,2024-03-29T14:35:30Z,2024-03-29T14:35:29Z,MEMBER,,0,pydata/xarray/pulls/8875,We need to read existing variables to make sure we append or write to a region with the right encoding. Currently we decode all arrays in a Zarr group. Instead only decode those arrays for which we require encoding information.,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8875/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2206385638,PR_kwDOAMm_X85qsSKm,8877,Don't allow overwriting indexes with region writes,2448579,closed,0,,,0,2024-03-25T18:13:19Z,2024-03-27T16:24:37Z,2024-03-27T16:24:35Z,MEMBER,,0,pydata/xarray/pulls/8877,"- [x] Closes #8589
- [x] Tests added
- [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
cc @slevang
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8877/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2189750364,PR_kwDOAMm_X85p0Epw,8847,pandas 3 MultiIndex fixes,2448579,closed,0,,,0,2024-03-16T03:51:06Z,2024-03-20T15:00:20Z,2024-03-20T15:00:18Z,MEMBER,,0,pydata/xarray/pulls/8847,"xref #8844
Closes https://github.com/xarray-contrib/flox/issues/342","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8847/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2187682227,PR_kwDOAMm_X85ps6tB,8839,[skip-ci] Fix upstream-dev env,2448579,closed,0,,,0,2024-03-15T04:08:58Z,2024-03-15T04:37:59Z,2024-03-15T04:37:58Z,MEMBER,,0,pydata/xarray/pulls/8839,"
upstream-dev env is broken
- [x] Closes #8623
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8839/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2187646833,PR_kwDOAMm_X85psy9g,8837,Add dask-expr for windows envs,2448579,closed,0,,,0,2024-03-15T03:27:48Z,2024-03-15T04:06:05Z,2024-03-15T04:06:03Z,MEMBER,,0,pydata/xarray/pulls/8837,"
- [x] Closes #8830
- [ ] Tests added
- [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
- [ ] New functions/methods are listed in `api.rst`
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8837/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2184606202,PR_kwDOAMm_X85picsD,8827,Add `dask-expr` to environment-3.12.yml,2448579,closed,0,,,0,2024-03-13T18:07:27Z,2024-03-13T20:20:46Z,2024-03-13T20:20:45Z,MEMBER,,0,pydata/xarray/pulls/8827,xref https://github.com/pydata/xarray/actions/runs/8269168819/job/22623800305?pr=8777,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8827/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2148242023,PR_kwDOAMm_X85nml9d,8776,Refactor Grouper objects,2448579,closed,0,,,0,2024-02-22T05:38:09Z,2024-03-07T21:50:07Z,2024-03-07T21:50:04Z,MEMBER,,0,pydata/xarray/pulls/8776,"Some refactoring towards the Grouper refactor described in #8510
1. Rename to Resampler from ResampleGrouper
2. Refactor to a single ""ResolvedGrouper"" object that encapsulates the underling Grouper/Resampler object: UniqueGrouper, BinGrouper, or TimeResampler.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8776/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2135011804,I_kwDOAMm_X85_QbHc,8748,release v2024.02.0,2448579,closed,0,14808389,,0,2024-02-14T19:08:38Z,2024-02-18T22:52:15Z,2024-02-18T22:52:15Z,MEMBER,,,,"### What is your issue?
Thanks to @keewis for volunteering at today's meeting :()","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8748/reactions"", ""total_count"": 3, ""+1"": 0, ""-1"": 0, ""laugh"": 1, ""hooray"": 0, ""confused"": 0, ""heart"": 2, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue
2098626592,PR_kwDOAMm_X85k-Mnt,8657,groupby: Don't set `method` by default on flox>=0.9,2448579,closed,0,,,0,2024-01-24T16:20:57Z,2024-01-26T16:54:25Z,2024-01-26T16:54:23Z,MEMBER,,0,pydata/xarray/pulls/8657,"
- [x] Tests added
- [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst`","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8657/reactions"", ""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2086607437,I_kwDOAMm_X858XxpN,8616, new release 2024.01.0,2448579,closed,0,,,0,2024-01-17T17:03:20Z,2024-01-17T19:21:12Z,2024-01-17T19:21:12Z,MEMBER,,,,"### What is your issue?
Thanks @TomNicholas for volunteering to drive this release!","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8616/reactions"", ""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 1, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue
2065788086,PR_kwDOAMm_X85jOw74,8585,Enable Zarr V3 tests in all CI runs.,2448579,closed,0,,,0,2024-01-04T14:45:44Z,2024-01-05T17:53:08Z,2024-01-05T17:53:06Z,MEMBER,,0,pydata/xarray/pulls/8585,"🤦🏾♂️
Spotted in https://github.com/pydata/xarray/pull/8460
Builds on #8586 ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8585/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2064420057,I_kwDOAMm_X857DIzZ,8581,bump min versions,2448579,closed,0,,,0,2024-01-03T17:45:10Z,2024-01-05T16:13:16Z,2024-01-05T16:13:15Z,MEMBER,,,,"### What is your issue?
Looks like we can bump a number of min versions:
```
Package Required Policy Status
----------------- -------------------- -------------------- ------
cartopy 0.20 (2021-09-17) 0.21 (2022-09-10) <
dask-core 2022.7 (2022-07-08) 2022.12 (2022-12-02) <
distributed 2022.7 (2022-07-08) 2022.12 (2022-12-02) <
flox 0.5 (2022-05-03) 0.6 (2022-10-12) <
iris 3.2 (2022-02-15) 3.4 (2022-12-01) <
matplotlib-base 3.5 (2021-11-18) 3.6 (2022-09-16) <
numba 0.55 (2022-01-14) 0.56 (2022-09-28) <
numpy 1.22 (2022-01-03) 1.23 (2022-06-23) <
packaging 21.3 (2021-11-18) 22.0 (2022-12-08) <
pandas 1.4 (2022-01-22) 1.5 (2022-09-19) <
scipy 1.8 (2022-02-06) 1.9 (2022-07-30) <
seaborn 0.11 (2020-09-08) 0.12 (2022-09-06) <
typing_extensions 4.3 (2022-07-01) 4.4 (2022-10-07) <
zarr 2.12 (2022-06-23) 2.13 (2022-09-27) <
```","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8581/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue
2065809896,PR_kwDOAMm_X85jO1oX,8586,Bump min deps.,2448579,closed,0,,,0,2024-01-04T14:59:05Z,2024-01-05T16:13:16Z,2024-01-05T16:13:14Z,MEMBER,,0,pydata/xarray/pulls/8586,"
- [x] Closes #8581
- [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst`","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8586/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2047617215,PR_kwDOAMm_X85iUJ7y,8560,Adapt map_blocks to use new Coordinates API,2448579,closed,0,,,0,2023-12-18T23:11:55Z,2023-12-20T17:11:18Z,2023-12-20T17:11:16Z,MEMBER,,0,pydata/xarray/pulls/8560,"Fixes roundtripping of string dtype indexes
- [x] Tests added
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8560/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2033054792,PR_kwDOAMm_X85hi5U2,8532,Whats-new for 2023.12.0,2448579,closed,0,,,0,2023-12-08T17:29:47Z,2023-12-08T19:36:28Z,2023-12-08T19:36:26Z,MEMBER,,0,pydata/xarray/pulls/8532,"
- [ ] Closes #xxxx
- [ ] Tests added
- [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
- [ ] New functions/methods are listed in `api.rst`
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8532/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1989588884,I_kwDOAMm_X852lreU,8448,mypy 1.7.0 raising errors,2448579,closed,0,,,0,2023-11-12T21:41:43Z,2023-12-01T22:02:22Z,2023-12-01T22:02:22Z,MEMBER,,,,"### What happened?
```
xarray/namedarray/core.py:758: error: Value of type Never is not indexable [index]
xarray/core/alignment.py:684: error: Unused ""type: ignore"" comment [unused-ignore]
xarray/core/alignment.py:1156: error: Unused ""type: ignore"" comment [unused-ignore]
xarray/core/dataset.py: note: In member ""sortby"" of class ""Dataset"":
xarray/core/dataset.py:7967: error: Incompatible types in assignment (expression has type ""tuple[Alignable, ...]"", variable has type ""tuple[DataArray, ...]"") [assignment]
xarray/core/dataset.py:7979: error: ""Alignable"" has no attribute ""isel"" [attr-defined]
```
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8448/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue
2003229011,PR_kwDOAMm_X85f9xPG,8472,Avoid duplicate Zarr array read,2448579,closed,0,,,0,2023-11-21T00:16:34Z,2023-12-01T02:58:22Z,2023-12-01T02:47:03Z,MEMBER,,0,pydata/xarray/pulls/8472,"We already get the underlying Zarr array in
https://github.com/pydata/xarray/blob/bb8511e0894020e180d95d2edb29ed4036ac6447/xarray/backends/zarr.py#L529-L531
and then pass it to `open_store_variable`. Just pass that array down to `ZarrArrayWrapper` instead of reading it from the datastore again.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8472/reactions"", ""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
2015530249,PR_kwDOAMm_X85gnO8L,8489,Minor to_zarr optimizations,2448579,closed,0,,,0,2023-11-28T23:56:32Z,2023-12-01T02:20:19Z,2023-12-01T02:18:18Z,MEMBER,,0,pydata/xarray/pulls/8489,Avoid repeatedly pinging a remote store by requesting keys at one go.,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8489/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1997656427,PR_kwDOAMm_X85frEdb,8461,2023.11.0 Whats-new,2448579,closed,0,,,0,2023-11-16T19:55:12Z,2023-11-17T21:02:22Z,2023-11-17T21:02:20Z,MEMBER,,0,pydata/xarray/pulls/8461,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8461/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1997136566,PR_kwDOAMm_X85fpRL3,8458,Pin mypy < 1.7,2448579,closed,0,,,0,2023-11-16T15:31:26Z,2023-11-16T17:29:04Z,2023-11-16T17:29:03Z,MEMBER,,0,pydata/xarray/pulls/8458,"xref #8448
get back to green checks for now.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8458/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1995186323,PR_kwDOAMm_X85finmE,8452,[skip-ci] Small updates to IO docs.,2448579,closed,0,,,0,2023-11-15T17:05:47Z,2023-11-16T15:19:59Z,2023-11-16T15:19:57Z,MEMBER,,0,pydata/xarray/pulls/8452,Also fixes the RTD failure on main,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8452/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1635949876,PR_kwDOAMm_X85MpxlL,7659,Redo whats-new for 2023.03.0,2448579,closed,0,,,0,2023-03-22T15:02:38Z,2023-11-06T04:25:54Z,2023-03-22T15:42:49Z,MEMBER,,0,pydata/xarray/pulls/7659,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7659/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1630533356,PR_kwDOAMm_X85MXo4e,7643,Whats-new for release 2023.03.0,2448579,closed,0,,,0,2023-03-18T19:14:55Z,2023-11-06T04:25:53Z,2023-03-20T15:57:36Z,MEMBER,,0,pydata/xarray/pulls/7643,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7643/reactions"", ""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 1, ""eyes"": 0}",,,13221727,pull
1533942791,PR_kwDOAMm_X85HahUq,7440,v2023.01.0 whats-new,2448579,closed,0,,,0,2023-01-15T18:20:28Z,2023-11-06T04:25:52Z,2023-01-18T21:18:49Z,MEMBER,,0,pydata/xarray/pulls/7440,Should update the date and delete empty sections before merging,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7440/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1942673099,PR_kwDOAMm_X85cxp-D,8305,Update labeler.yml to add NamedArray,2448579,closed,0,,,0,2023-10-13T21:39:56Z,2023-10-14T06:47:08Z,2023-10-14T06:47:07Z,MEMBER,,0,pydata/xarray/pulls/8305,"
- [ ] Closes #xxxx
- [ ] Tests added
- [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
- [ ] New functions/methods are listed in `api.rst`
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8305/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1874773066,PR_kwDOAMm_X85ZMtUP,8126,Allow creating DataArrays with nD coordinate variables,2448579,closed,0,,,0,2023-08-31T04:40:37Z,2023-09-22T12:48:38Z,2023-09-22T12:48:34Z,MEMBER,,0,pydata/xarray/pulls/8126,"- [x] Closes #8106
- [x] Tests added
- [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
cc @blaylockbk
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8126/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1812504689,I_kwDOAMm_X85sCKBx,8006,Fix documentation about datetime_unit of xarray.DataArray.differentiate,2448579,closed,0,,,0,2023-07-19T18:31:10Z,2023-09-01T09:37:15Z,2023-09-01T09:37:15Z,MEMBER,,,,"Should say that `Y` and `M` cannot be supported with `datetime64`
### Discussed in https://github.com/pydata/xarray/discussions/8000
Originally posted by **jesieleo** July 19, 2023
I have a piece of data that looks like this
```
Dimensions: (time: 612, LEV: 15, latitude: 20, longitude: 357)
Coordinates:
* time (time) datetime64[ns] 1960-01-15 1960-02-15 ... 2010-12-15
* LEV (LEV) float64 5.01 15.07 25.28 35.76 ... 149.0 171.4 197.8 229.5
* latitude (latitude) float64 -4.75 -4.25 -3.75 -3.25 ... 3.75 4.25 4.75
* longitude (longitude) float64 114.2 114.8 115.2 115.8 ... 291.2 291.8 292.2
Data variables:
u (time, LEV, latitude, longitude) float32 ...
Attributes: (12/30)
cdm_data_type: Grid
Conventions: COARDS, CF-1.6, ACDD-1.3
creator_email: chepurin@umd.edu
creator_name: APDRC
creator_type: institution
creator_url: https://www.atmos.umd.edu/~ocean/
... ...
standard_name_vocabulary: CF Standard Name Table v29
summary: Simple Ocean Data Assimilation (SODA) soda po...
time_coverage_end: 2010-12-15T00:00:00Z
time_coverage_start: 1983-01-15T00:00:00Z
title: SODA soda pop2.2.4 [TIME][LEV][LAT][LON]
Westernmost_Easting: 118.25
```
when i try to use xarray.DataArray.differentiate
`data.u.differentiate('time',datetime_unit='M')`
will appear
```
Traceback (most recent call last):
File """", line 1, in
File ""D:\Anaconda3\lib\site-packages\xarray\core\dataarray.py"", line 3609, in differentiate
ds = self._to_temp_dataset().differentiate(coord, edge_order, datetime_unit)
File ""D:\Anaconda3\lib\site-packages\xarray\core\dataset.py"", line 6372, in differentiate
coord_var = coord_var._to_numeric(datetime_unit=datetime_unit)
File ""D:\Anaconda3\lib\site-packages\xarray\core\variable.py"", line 2428, in _to_numeric
numeric_array = duck_array_ops.datetime_to_numeric(
File ""D:\Anaconda3\lib\site-packages\xarray\core\duck_array_ops.py"", line 466, in datetime_to_numeric
array = array / np.timedelta64(1, datetime_unit)
TypeError: Cannot get a common metadata divisor for Numpy datatime metadata [ns] and [M] because they have incompatible nonlinear base time units.
```
Would you please told me is this a BUG?
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8006/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue
1861692451,PR_kwDOAMm_X85YgtYD,8098,[skip-ci] dev whats-new,2448579,closed,0,,,0,2023-08-22T15:20:54Z,2023-08-22T20:46:29Z,2023-08-22T20:46:29Z,MEMBER,,0,pydata/xarray/pulls/8098,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8098/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1855338426,PR_kwDOAMm_X85YLRQH,8081,Add 2023.08.0 whats-new,2448579,closed,0,,,0,2023-08-17T16:36:06Z,2023-08-18T20:12:27Z,2023-08-18T20:12:25Z,MEMBER,,0,pydata/xarray/pulls/8081,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8081/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1829952467,PR_kwDOAMm_X85W1yq4,8033,Reduce pre-commit update frequency to monthly from weekly.,2448579,closed,0,,,0,2023-07-31T20:16:05Z,2023-08-01T16:48:12Z,2023-08-01T16:48:10Z,MEMBER,,0,pydata/xarray/pulls/8033,We could even go down to `quarterly`,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8033/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1642299599,I_kwDOAMm_X85h44DP,7683,automatically chunk in groupby binary ops,2448579,closed,0,,,0,2023-03-27T15:14:09Z,2023-07-27T16:41:35Z,2023-07-27T16:41:34Z,MEMBER,,,,"### What happened?
From https://discourse.pangeo.io/t/xarray-unable-to-allocate-memory-how-to-size-up-problem/3233/4
Consider
``` python
# ds is dataset with big dask arrays
mean = ds.groupby(""time.day"").mean()
mean.to_netcdf()
mean = xr.open_dataset(...)
ds.groupby(""time.day"") - mean
```
In `GroupBy._binary_op`
https://github.com/pydata/xarray/blob/39caafae4452f5327a7cd671b18d4bb3eb3785ba/xarray/core/groupby.py#L616
we will eagerly construct `other` that is of the same size as `ds`.
### What did you expect to happen?
I think the only solution is to automatically chunk if `ds` has dask arrays, and `other` (or `mean`) isn't backed by dask arrays. A chunk size of `1` seems sensible.
### Minimal Complete Verifiable Example
_No response_
### MVCE confirmation
- [ ] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
- [ ] Complete example — the example is self-contained, including all data and the text of any traceback.
- [ ] 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.
- [ ] New issue — a search of GitHub Issues suggests this is not a duplicate.
### Relevant log output
_No response_
### Anything else we need to know?
_No response_
### Environment
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7683/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue
1812646094,PR_kwDOAMm_X85V7g7q,8007,Update copyright year in README,2448579,closed,0,,,0,2023-07-19T20:00:50Z,2023-07-20T21:13:27Z,2023-07-20T21:13:26Z,MEMBER,,0,pydata/xarray/pulls/8007,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8007/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1797636782,I_kwDOAMm_X85rJcKu,7976,Explore updating colormap code,2448579,closed,0,,,0,2023-07-10T21:51:30Z,2023-07-11T13:49:54Z,2023-07-11T13:49:53Z,MEMBER,,,,"### What is your issue?
See https://github.com/matplotlib/matplotlib/issues/16296
Looks like the MPL API may have advanced enough that we can delete some of our use of private attributes.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7976/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue
1701070898,PR_kwDOAMm_X85QCzA1,7830,Fix .groupby(multi index level),2448579,closed,0,,,0,2023-05-08T23:16:07Z,2023-06-06T00:21:36Z,2023-06-06T00:21:31Z,MEMBER,,0,pydata/xarray/pulls/7830,"- [x] Closes #6836
- [x] Tests added
- [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7830/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1692597701,I_kwDOAMm_X85k4v3F,7808,Default behaviour of `min_count` wrong with flox,2448579,closed,0,,,0,2023-05-02T15:04:11Z,2023-05-10T02:39:45Z,2023-05-10T02:39:45Z,MEMBER,,,,"### What happened?
```python
with xr.set_options(display_style=""text"", use_flox=False):
with xr.set_options(use_flox=False):
display(
xr.DataArray(
data=np.array([np.nan, 1, 1, np.nan, 1, 1]),
dims=""x"",
coords={""labels"": (""x"", np.array([1, 2, 3, 1, 2, 3]))},
)
.groupby(""labels"")
.sum()
)
with xr.set_options(use_flox=True):
display(
xr.DataArray(
data=np.array([np.nan, 1, 1, np.nan, 1, 1]),
dims=""x"",
coords={""labels"": (""x"", np.array([1, 2, 3, 1, 2, 3]))},
)
.groupby(""labels"")
.sum()
)
```
```
# without flox
array([0., 2., 2.])
Coordinates:
* labels (labels) int64 1 2 3
# with flox
array([nan, 2., 2.])
Coordinates:
* labels (labels) int64 1 2 3
```
### What did you expect to happen?
The same answer. We should set `min_count=0` when `min_count is None`
### Minimal Complete Verifiable Example
_No response_
### MVCE confirmation
- [ ] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
- [ ] Complete example — the example is self-contained, including all data and the text of any traceback.
- [ ] 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.
- [ ] New issue — a search of GitHub Issues suggests this is not a duplicate.
### Relevant log output
_No response_
### Anything else we need to know?
_No response_
### Environment
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7808/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue
1692612622,PR_kwDOAMm_X85PmMOy,7809,Fix `min_count` behaviour with flox.,2448579,closed,0,,,0,2023-05-02T15:13:17Z,2023-05-10T02:39:45Z,2023-05-10T02:39:43Z,MEMBER,,0,pydata/xarray/pulls/7809,"
- [x] Closes #7808
- [x] Tests added
- [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst`","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7809/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1677167290,PR_kwDOAMm_X85Oyokd,7775,[skip-ci] dev whats-new,2448579,closed,0,,,0,2023-04-20T17:54:27Z,2023-04-20T21:08:14Z,2023-04-20T21:08:11Z,MEMBER,,0,pydata/xarray/pulls/7775,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7775/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1677161134,PR_kwDOAMm_X85OynVg,7774,[skip-ci] Release 2023.04.2,2448579,closed,0,,,0,2023-04-20T17:49:46Z,2023-04-20T18:26:39Z,2023-04-20T18:26:37Z,MEMBER,,0,pydata/xarray/pulls/7774,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7774/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1671616256,PR_kwDOAMm_X85OgCYb,7762,Fix binning by unsorted array,2448579,closed,0,,,0,2023-04-17T17:04:45Z,2023-04-18T14:48:28Z,2023-04-18T14:48:23Z,MEMBER,,0,pydata/xarray/pulls/7762,"- [x] Closes #7759
- [x] Tests added
- [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7762/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1668569869,PR_kwDOAMm_X85OV_JV,7757,Add whats-new for v2023.04.0,2448579,closed,0,,,0,2023-04-14T16:36:01Z,2023-04-14T17:25:37Z,2023-04-14T17:25:35Z,MEMBER,,0,pydata/xarray/pulls/7757,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7757/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1658287743,PR_kwDOAMm_X85N0Afw,7736,"align: Avoid reindexing when join=""exact""",2448579,closed,0,,,0,2023-04-07T02:46:08Z,2023-04-12T14:41:53Z,2023-04-12T14:41:51Z,MEMBER,,0,pydata/xarray/pulls/7736,"xref #7730, #7737
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7736/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1658319105,PR_kwDOAMm_X85N0Gez,7738,[skip-ci] Add alignment benchmarks,2448579,closed,0,,,0,2023-04-07T03:40:32Z,2023-04-07T22:31:08Z,2023-04-07T22:31:05Z,MEMBER,,0,pydata/xarray/pulls/7738,xref #4648,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7738/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1656619829,PR_kwDOAMm_X85Nuo9M,7729,Test: new index from dask.array computes only once,2448579,closed,0,,,0,2023-04-06T03:52:22Z,2023-04-06T04:15:47Z,2023-04-06T04:15:45Z,MEMBER,,0,pydata/xarray/pulls/7729,"Closes #1533
Seems to have been fixed by the indexes refactor","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7729/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1268667121,PR_kwDOAMm_X845hbaE,6689,Refactor GroupBy init to avoid factorization,2448579,closed,0,,,0,2022-06-12T18:41:04Z,2023-03-29T16:28:29Z,2023-03-29T16:28:29Z,MEMBER,,1,pydata/xarray/pulls/6689,"Refactoring `GroupBy.__init__` as a step toward #6610
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6689/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1636110117,PR_kwDOAMm_X85MqTjx,7660,[skip-ci] dev whats-new,2448579,closed,0,,,0,2023-03-22T16:22:46Z,2023-03-22T17:57:15Z,2023-03-22T17:57:13Z,MEMBER,,0,pydata/xarray/pulls/7660,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7660/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1600469223,PR_kwDOAMm_X85Ky0-D,7562,"Support first, last with dask arrays",2448579,closed,0,,,0,2023-02-27T04:54:09Z,2023-03-03T23:13:57Z,2023-03-03T23:13:52Z,MEMBER,,0,pydata/xarray/pulls/7562,"Use dask.array.reduction. For this we need to add support for the `keepdims` kwarg to `nanfirst` and `nanlast`. Even though the final result is always keepdims=False, dask runs the intermediate steps with keepdims=True.
- [ ] Closes #xxxx
- [x] Tests added
- [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7562/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1574631376,PR_kwDOAMm_X85JcpzG,7512,Update HOW_TO_RELEASE.md,2448579,closed,0,,,0,2023-02-07T16:23:50Z,2023-02-07T17:40:52Z,2023-02-07T17:40:50Z,MEMBER,,0,pydata/xarray/pulls/7512,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7512/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1574621206,PR_kwDOAMm_X85Jcnno,7511,Update whats-new for dev,2448579,closed,0,,,0,2023-02-07T16:17:20Z,2023-02-07T17:40:28Z,2023-02-07T17:40:26Z,MEMBER,,0,pydata/xarray/pulls/7511,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7511/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1548082114,PR_kwDOAMm_X85IEVEf,7454,Mention flox in docs,2448579,closed,0,,,0,2023-01-18T20:46:30Z,2023-01-26T16:59:44Z,2023-01-26T16:59:41Z,MEMBER,,0,pydata/xarray/pulls/7454,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7454/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1536791632,PR_kwDOAMm_X85HkDxR,7449,[skip-cii] Add pyodide update instructions to HOW_TO_RELEASE,2448579,closed,0,,,0,2023-01-17T17:46:51Z,2023-01-19T14:01:39Z,2023-01-19T14:01:37Z,MEMBER,,0,pydata/xarray/pulls/7449,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7449/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1548137655,PR_kwDOAMm_X85IEhQU,7455,[skip-ci] whats-new for next release,2448579,closed,0,,,0,2023-01-18T21:32:59Z,2023-01-19T14:01:20Z,2023-01-19T14:01:17Z,MEMBER,,0,pydata/xarray/pulls/7455,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7455/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1473583411,PR_kwDOAMm_X85ELiEY,7351,[skip-ci] whats-new for dev,2448579,closed,0,,,0,2022-12-02T23:44:48Z,2022-12-04T18:25:22Z,2022-12-04T18:25:20Z,MEMBER,,0,pydata/xarray/pulls/7351,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7351/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1472041871,PR_kwDOAMm_X85EGUMF,7345,Whats-new: 2022.12.0,2448579,closed,0,,,0,2022-12-01T22:27:33Z,2022-12-02T22:57:57Z,2022-12-02T22:57:53Z,MEMBER,,0,pydata/xarray/pulls/7345,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7345/reactions"", ""total_count"": 3, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 2, ""confused"": 0, ""heart"": 1, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1436632685,PR_kwDOAMm_X85CPVIi,7257,[skip-ci] dev whats-new,2448579,closed,0,,,0,2022-11-04T20:47:21Z,2022-11-04T23:08:03Z,2022-11-04T23:08:01Z,MEMBER,,0,pydata/xarray/pulls/7257,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7257/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1421036686,PR_kwDOAMm_X85BbOeg,7205,Fix binning when labels are provided.,2448579,closed,0,,,0,2022-10-24T15:40:27Z,2022-10-26T15:56:37Z,2022-10-26T15:56:35Z,MEMBER,,0,pydata/xarray/pulls/7205,"- [x] Closes #7198
- [x] Tests added
- [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7205/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1408327952,PR_kwDOAMm_X85Aw5A3,7161,dev whats-new ,2448579,closed,0,,,0,2022-10-13T19:36:19Z,2022-10-18T19:16:22Z,2022-10-13T21:05:08Z,MEMBER,,0,pydata/xarray/pulls/7161,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7161/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1302718665,PR_kwDOAMm_X847TJVP,6780,Update flox repo URL,2448579,closed,0,,,0,2022-07-12T23:25:23Z,2022-10-18T19:16:20Z,2022-07-13T02:36:50Z,MEMBER,,0,pydata/xarray/pulls/6780,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6780/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1283026595,PR_kwDOAMm_X846Rn-p,6719,Add new datasets to tutorial.load_dataset docstring,2448579,closed,0,,,0,2022-06-23T22:20:08Z,2022-10-18T19:16:19Z,2022-06-28T18:53:31Z,MEMBER,,0,pydata/xarray/pulls/6719,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6719/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1286270270,PR_kwDOAMm_X846cLwN,6732,[skip-ci] Reorganize the Plotting section of API Reference,2448579,closed,0,,,0,2022-06-27T19:50:23Z,2022-10-18T19:16:17Z,2022-06-28T18:52:32Z,MEMBER,,0,pydata/xarray/pulls/6732,"One top level heading with Dataset, DataArray, and
Faceting subsections.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6732/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1302210315,PR_kwDOAMm_X847RabS,6776,Update map_blocks to use chunksizes property.,2448579,closed,0,,,0,2022-07-12T15:16:45Z,2022-10-18T19:16:15Z,2022-07-14T17:42:26Z,MEMBER,,0,pydata/xarray/pulls/6776,"Raise nicer error if provided template has no dask arrays.
- [x] Closes #6763
- [x] Tests added","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6776/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1370340170,PR_kwDOAMm_X84-zpR-,7022,Preserve all attrs with GroupBy by default.,2448579,closed,0,,,0,2022-09-12T18:26:47Z,2022-10-18T19:15:21Z,2022-09-13T15:30:29Z,MEMBER,,0,pydata/xarray/pulls/7022,"Closes #7012
When `use_flox=False`, we pass `keep_attrs=None` to `Data*.reduce`. This ends up delete Dataset and DataArray level attrs but preserves coordinate variable attrs. We now set the default to True always to match the default behaviour of `apply_ufunc` used by `flox.xarray.xarray_reduce`.
- [x] Closes #7012
- [x] Tests added
- [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst`","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7022/reactions"", ""total_count"": 3, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 1, ""eyes"": 0}",,,13221727,pull
1330389950,PR_kwDOAMm_X848vgCB,6882,Allow decoding of size-0 datetimes,2448579,closed,0,,,0,2022-08-05T21:00:13Z,2022-10-18T19:15:17Z,2022-08-10T17:25:19Z,MEMBER,,0,pydata/xarray/pulls/6882,"
- [x] Closes #1329
- [x] Tests added
- [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6882/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1306156897,PR_kwDOAMm_X847ejCK,6788,Warn when grouping by dask array.,2448579,closed,0,,,0,2022-07-15T15:15:03Z,2022-10-18T19:15:15Z,2022-07-15T18:05:06Z,MEMBER,,0,pydata/xarray/pulls/6788,"Currently computes eagerly; we want to not do that in the future
(broken out from #6689)
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6788/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1408315481,PR_kwDOAMm_X85Aw2RF,7160,v2022.10.0 whats-new,2448579,closed,0,,,0,2022-10-13T19:25:11Z,2022-10-13T20:28:06Z,2022-10-13T20:28:05Z,MEMBER,,0,pydata/xarray/pulls/7160,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7160/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
626591460,MDU6SXNzdWU2MjY1OTE0NjA=,4107,renaming Variable to a dimension name does not convert to IndexVariable,2448579,closed,0,4160723,,0,2020-05-28T15:11:49Z,2022-09-27T09:33:42Z,2022-09-27T09:33:42Z,MEMBER,,,,"
Seen in #4103
#### MCVE Code Sample
```python
from xarray.tests import assert_identical
coord_1 = xr.DataArray([1, 2], dims=[""coord_1""], attrs={""attrs"": True})
da = xr.DataArray([1, 0], [coord_1])
obj = da.reset_index(""coord_1"").rename({""coord_1_"": ""coord_1""})
assert_identical(da, obj)
```
#### Expected Output
#### Problem Description
```
AssertionErrorTraceback (most recent call last)
in
----> 1 assert_identical(da, obj)
~/work/python/xarray/xarray/tests/__init__.py in assert_identical(a, b)
160 xarray.testing.assert_identical(a, b)
161 xarray.testing._assert_internal_invariants(a)
--> 162 xarray.testing._assert_internal_invariants(b)
163
164
~/work/python/xarray/xarray/testing.py in _assert_internal_invariants(xarray_obj)
265 _assert_variable_invariants(xarray_obj)
266 elif isinstance(xarray_obj, DataArray):
--> 267 _assert_dataarray_invariants(xarray_obj)
268 elif isinstance(xarray_obj, Dataset):
269 _assert_dataset_invariants(xarray_obj)
~/work/python/xarray/xarray/testing.py in _assert_dataarray_invariants(da)
210 assert all(
211 isinstance(v, IndexVariable) for (k, v) in da._coords.items() if v.dims == (k,)
--> 212 ), {k: type(v) for k, v in da._coords.items()}
213 for k, v in da._coords.items():
214 _assert_variable_invariants(v, k)
AssertionError: {'coord_1': }
```
#### Versions
Output of xr.show_versions()
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4107/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue
1262168838,PR_kwDOAMm_X845LyRA,6667,Set keep_attrs for flox,2448579,closed,0,,,0,2022-06-06T17:58:10Z,2022-09-12T18:08:35Z,2022-06-06T18:53:37Z,MEMBER,,0,pydata/xarray/pulls/6667,"Closes #6666
False by default following Dataset.reduce","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6667/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1352462722,PR_kwDOAMm_X8494KNn,6958,[skip-ci] Stop applying topic-documentation label,2448579,closed,0,,,0,2022-08-26T16:09:58Z,2022-08-26T16:10:30Z,2022-08-26T16:10:29Z,MEMBER,,0,pydata/xarray/pulls/6958,"Lots of false positives.
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6958/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1342137214,PR_kwDOAMm_X849V9ip,6925,Update PR labels,2448579,closed,0,,,0,2022-08-17T18:38:02Z,2022-08-19T15:53:41Z,2022-08-19T15:53:40Z,MEMBER,,0,pydata/xarray/pulls/6925,"Use `topic-documentation` and automatically run benchmarks
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6925/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1326096263,PR_kwDOAMm_X848hKwg,6869,Add cupy-xarray; update pint-xarray url,2448579,closed,0,,,0,2022-08-02T16:26:02Z,2022-08-02T16:56:22Z,2022-08-02T16:56:21Z,MEMBER,,0,pydata/xarray/pulls/6869,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6869/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1313843378,PR_kwDOAMm_X8474tEy,6815,Release notes for v2022.06.0,2448579,closed,0,,,0,2022-07-21T21:51:33Z,2022-07-22T15:45:00Z,2022-07-22T15:44:58Z,MEMBER,,0,pydata/xarray/pulls/6815,"
- [x] Closes #6645
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6815/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1306166753,PR_kwDOAMm_X847elJQ,6789,Refactor groupby binary ops code.,2448579,closed,0,,,0,2022-07-15T15:24:44Z,2022-07-20T01:30:11Z,2022-07-20T01:30:09Z,MEMBER,,0,pydata/xarray/pulls/6789,Cleaner implementation; also broken out from #6689 ,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6789/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1306155046,PR_kwDOAMm_X847eipZ,6787,Update groupby attrs tests,2448579,closed,0,,,0,2022-07-15T15:13:08Z,2022-07-15T21:37:44Z,2022-07-15T21:37:43Z,MEMBER,,0,pydata/xarray/pulls/6787,Update tests + add a couple more,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6787/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1289174987,I_kwDOAMm_X85M1z_L,6739,"""center"" kwarg ignored when manually iterating over DataArrayRolling",2448579,closed,0,,,0,2022-06-29T19:07:07Z,2022-07-14T17:41:01Z,2022-07-14T17:41:01Z,MEMBER,,,,"### Discussed in https://github.com/pydata/xarray/discussions/6738
Originally posted by **ckingdon95** June 29, 2022
Hello, I am trying to manually iterate over a DataArrayRolling object, as described [here ](https://docs.xarray.dev/en/stable/user-guide/computation.html#rolling-window-operations)in the documentation.
I am confused why the following two code chunks do not produce the same sequence of values. I would like to be able to manually iterate over a DataArrayRolling object, and still be given center-justified windows. Is there a way to do this?
```python
import xarray as xr
import numpy as np
my_data = xr.DataArray(np.arange(1,10), dims=""x"")
# Option 1: take a center-justified rolling average
result1 = my_data.rolling(x=3, center=True).mean().values
result1
```
This returns the following values, as expected:
```
array([nan, 2., 3., 4., 5., 6., 7., 8., nan])
```
Whereas when I do it manually, it is not equivalent:
```python
# Option 2: try to manually iterate, but the result is not centered
my_data_rolling = my_data.rolling(x=3, center=True)
result2 = [window.mean().values.item() for label, window in my_data_rolling]
result2
```
This returns
```
[nan, nan, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]
```
Is this an issue with the window iterator? If it is not an issue, then is there a way for me to get the center-justified windows in the manual iteration?
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6739/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue
1289209625,PR_kwDOAMm_X846l-cA,6740,Add pre-release install instructions to whats-new,2448579,closed,0,,,0,2022-06-29T19:40:02Z,2022-06-29T20:04:28Z,2022-06-29T20:04:27Z,MEMBER,,0,pydata/xarray/pulls/6740,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6740/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1284257698,PR_kwDOAMm_X846VxFI,6724,[skip-ci] Add sphinx module directive,2448579,closed,0,,,0,2022-06-24T22:46:10Z,2022-06-26T02:00:51Z,2022-06-25T23:39:34Z,MEMBER,,0,pydata/xarray/pulls/6724,"xref https://github.com/xarray-contrib/xarray-tutorial/pull/85#issuecomment-1159518073
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6724/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1284252630,PR_kwDOAMm_X846VwFj,6723,Better documentation of options,2448579,closed,0,,,0,2022-06-24T22:40:24Z,2022-06-25T20:01:18Z,2022-06-25T20:01:07Z,MEMBER,,0,pydata/xarray/pulls/6723,"- [x] Closes #1624, Closes #5699
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6723/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
968977385,MDU6SXNzdWU5Njg5NzczODU=,5699,describe options in documentation,2448579,closed,0,,,0,2021-08-12T14:48:00Z,2022-06-25T20:01:07Z,2022-06-25T20:01:07Z,MEMBER,,,,"I think we only describe available options in the API reference for `xr.set_options` It'd be nice to add a ""Configuring Xarray"" section in the User Guide.
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5699/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue
1279146110,PR_kwDOAMm_X846ESje,6711,[skip-ci] List count under Aggregation,2448579,closed,0,,,0,2022-06-21T21:49:46Z,2022-06-23T15:52:53Z,2022-06-23T15:52:51Z,MEMBER,,0,pydata/xarray/pulls/6711,"It's currently listed under ""Missing Value Handling"" but is also an Aggregation
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6711/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1178907807,I_kwDOAMm_X85GRLSf,6407,Add backend tutorial material,2448579,closed,0,,,0,2022-03-24T03:44:22Z,2022-06-23T01:51:44Z,2022-06-23T01:51:44Z,MEMBER,,,,"### What is your issue?
@aurghs developed some nice backend tutorial material for the Dask Summit: https://github.com/aurghs/xarray-backend-tutorial
It'd be nice to add it either to our main documentation or to https://github.com/xarray-contrib/xarray-tutorial.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6407/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue
1222215730,PR_kwDOAMm_X843If5A,6556,Support dask arrays in datetime_to_numeric,2448579,closed,0,,,0,2022-05-01T16:58:41Z,2022-05-31T16:44:17Z,2022-05-31T16:44:15Z,MEMBER,,0,pydata/xarray/pulls/6556,"- [x] Tests added
- [ ] Add polyval test with dask + cftime inputs after #6548 is merged","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6556/reactions"", ""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1238783899,I_kwDOAMm_X85J1leb,6616,flox breaks multiindex groupby,2448579,closed,0,,,0,2022-05-17T15:05:00Z,2022-05-17T16:11:18Z,2022-05-17T16:11:18Z,MEMBER,,,,"### What happened?
From @malmans2
``` python
import numpy as np
import xarray as xr
ds = xr.Dataset(
dict(a=((""z"",), np.ones(10))),
coords=dict(b=((""z""), np.arange(2).repeat(5)), c=((""z""), np.arange(5).repeat(2))),
).set_index(bc=[""b"", ""c""])
grouped = ds.groupby(""bc"")
with xr.set_options(use_flox=False):
grouped.sum() # OK
with xr.set_options(use_flox=True):
grouped.sum() # Error
```
### What did you expect to happen?
_No response_
### Minimal Complete Verifiable Example
_No response_
### MVCE confirmation
- [ ] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
- [ ] Complete example — the example is self-contained, including all data and the text of any traceback.
- [ ] 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.
- [ ] New issue — a search of GitHub Issues suggests this is not a duplicate.
### Relevant log output
```Python
ctests/test_xarray.py:329: in test_multi_index_groupby_sum
actual = xarray_reduce(ds, ""bc"", func=""sum"")
flox/xarray.py:374: in xarray_reduce
actual[k] = v.expand_dims(missing_group_dims)
../xarray/xarray/core/dataset.py:1427: in __setitem__
self.update({key: value})
../xarray/xarray/core/dataset.py:4432: in update
merge_result = dataset_update_method(self, other)
../xarray/xarray/core/merge.py:1070: in dataset_update_method
return merge_core(
../xarray/xarray/core/merge.py:722: in merge_core
aligned = deep_align(
../xarray/xarray/core/alignment.py:824: in deep_align
aligned = align(
../xarray/xarray/core/alignment.py:761: in align
aligner.align()
../xarray/xarray/core/alignment.py:550: in align
self.assert_unindexed_dim_sizes_equal()
../xarray/xarray/core/alignment.py:450: in assert_unindexed_dim_sizes_equal
raise ValueError(
E ValueError: cannot reindex or align along dimension 'bc' because of conflicting dimension sizes: {10, 6} (note: an index is found along that dimension with size=10)
______________________________ test_multi_index_groupby_sum[numpy] _______________________________
tests/test_xarray.py:329: in test_multi_index_groupby_sum
actual = xarray_reduce(ds, ""bc"", func=""sum"")
flox/xarray.py:374: in xarray_reduce
actual[k] = v.expand_dims(missing_group_dims)
../xarray/xarray/core/dataset.py:1427: in __setitem__
self.update({key: value})
../xarray/xarray/core/dataset.py:4432: in update
merge_result = dataset_update_method(self, other)
../xarray/xarray/core/merge.py:1070: in dataset_update_method
return merge_core(
../xarray/xarray/core/merge.py:722: in merge_core
aligned = deep_align(
../xarray/xarray/core/alignment.py:824: in deep_align
aligned = align(
../xarray/xarray/core/alignment.py:761: in align
aligner.align()
../xarray/xarray/core/alignment.py:550: in align
self.assert_unindexed_dim_sizes_equal()
../xarray/xarray/core/alignment.py:450: in assert_unindexed_dim_sizes_equal
raise ValueError(
E ValueError: cannot reindex or align along dimension 'bc' because of conflicting dimension sizes: {10, 6} (note: an index is found along that dimension with size=10)
```
```
### Anything else we need to know?
_No response_
### Environment
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6616/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue
1235494254,I_kwDOAMm_X85JpCVu,6606,Fix benchmark CI,2448579,closed,0,,,0,2022-05-13T17:18:32Z,2022-05-14T23:06:44Z,2022-05-14T23:06:44Z,MEMBER,,,,"### What is your issue?
It's failing during setup: https://github.com/pydata/xarray/runs/6424624397?check_suite_focus=true
```
· Discovering benchmarks
·· Uninstalling from conda-py3.8-bottleneck-dask-distributed-flox-netcdf4-numpy-numpy_groupies-pandas-scipy-sparse
·· Building dd20d07f for conda-py3.8-bottleneck-dask-distributed-flox-netcdf4-numpy-numpy_groupies-pandas-scipy-sparse
·· Error running /home/runner/work/xarray/xarray/asv_bench/.asv/env/e8ce5703538597037a298414451d04d2/bin/python -mpip wheel --no-deps --no-index -w /home/runner/work/xarray/xarray/asv_bench/.asv/env/e8ce5703538597037a298414451d04d2/asv-build-cache/dd20d07f4057a9e29222ca132c36cbaaf3fbb242 /home/runner/work/xarray/xarray/asv_bench/.asv/env/e8ce5703538597037a298414451d04d2/project (exit status 1)
STDOUT -------->
Processing /home/runner/work/xarray/xarray/asv_bench/.asv/env/e8ce5703538597037a298414451d04d2/project
STDERR -------->
ERROR: Some build dependencies for file:///home/runner/work/xarray/xarray/asv_bench/.asv/env/e8ce5703538597037a298414451d04d2/project are missing: 'setuptools_scm[toml]>=3.4', 'setuptools_scm_git_archive'.
·· Failed: trying different commit/environment
·· Uninstalling from conda-py3.8-bottleneck-dask-distributed-flox-netcdf4-numpy-numpy_groupies-pandas-scipy-sparse
·· Building c34ef8a6 for conda-py3.8-bottleneck-dask-distributed-flox-netcdf4-numpy-numpy_groupies-pandas-scipy-sparse
·· Error running /home/runner/work/xarray/xarray/asv_bench/.asv/env/e8ce5703538597037a298414451d04d2/bin/python -mpip wheel --no-deps --no-index -w /home/runner/work/xarray/xarray/asv_bench/.asv/env/e8ce5703538597037a298414451d04d2/asv-build-cache/c34ef8a60227720724e90aa11a6266c0026a812a /home/runner/work/xarray/xarray/asv_bench/.asv/env/e8ce5703538597037a298414451d04d2/project (exit status 1)
STDOUT -------->
Processing /home/runner/work/xarray/xarray/asv_bench/.asv/env/e8ce5703538597037a298414451d04d2/project
STDERR -------->
ERROR: Some build dependencies for file:///home/runner/work/xarray/xarray/asv_bench/.asv/env/e8ce5703538597037a298414451d04d2/project are missing: 'setuptools_scm[toml]>=3.4', 'setuptools_scm_git_archive'.
```","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6606/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue
1180334986,I_kwDOAMm_X85GWnuK,6411,Better dask support in polyval,2448579,closed,0,,,0,2022-03-25T04:35:48Z,2022-05-05T20:17:07Z,2022-05-05T20:17:07Z,MEMBER,,,,"### Is your feature request related to a problem?
polyval does not handle dask inputs well.
```python
nt = 8772 // 4
ny = 489
nx = 655
# chunks like the data is stored on disk
# small in time, big in space
# because the chunk sizes are -1 along lat, lon;
# reshaping this array to (time, latlon) prior to fitting is pretty cheap
chunks = (8, -1, -1)
da = xr.DataArray(
dask.array.random.random((nt, ny, nx), chunks=chunks),
dims=(""ocean_time"", ""eta_rho"", ""xi_rho""),
)
dim = ""ocean_time""
deg = 1
p = da.polyfit(dim=""ocean_time"", deg=1, skipna=False)
# create a chunked version of the ""ocean_time"" dimension
chunked_dim = xr.DataArray(
dask.array.from_array(da[dim].data, chunks=da.chunksizes[dim]), dims=dim, name=dim
)
xr.polyval(chunked_dim, p.polyfit_coefficients)
```
### Describe the solution you'd like
Here's a partial solution. It does not handle datetime inputs (polyval handles this using `get_clean_interp_index` which computes dask inputs). But I've replaced the call to `np.vander` and used `xr.dot`.
```python
def polyval(coord, coeffs, degree_dim=""degree""):
x = coord.data
deg_coord = coeffs[degree_dim]
N = int(deg_coord.max()) + 1
lhs = xr.DataArray(
np.stack([x ** (N - 1 - i) for i in range(N)], axis=1),
dims=(coord.name, degree_dim),
coords={coord.name: coord, degree_dim: np.arange(deg_coord.max() + 1)[::-1]},
)
return xr.dot(lhs, coeffs, dims=degree_dim)
polyval(chunked_dim, p.polyfit_coefficients)
```
This looks like what I expected
cc @aulemahal
### Describe alternatives you've considered
_No response_
### Additional context
_No response_","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6411/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue
1222387423,PR_kwDOAMm_X843JD4e,6559,Bump min deps,2448579,closed,0,,,0,2022-05-02T01:41:47Z,2022-05-05T19:15:42Z,2022-05-05T19:15:41Z,MEMBER,,0,pydata/xarray/pulls/6559,Still need to search for outdated code. Help is welcome!,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6559/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1196579608,PR_kwDOAMm_X8411e4b,6455,[skip-ci] Redirect raster analysis questions to rioxarray,2448579,closed,0,,,0,2022-04-07T21:17:56Z,2022-04-15T00:38:26Z,2022-04-15T00:38:26Z,MEMBER,,0,pydata/xarray/pulls/6455,"We seem to get a decent number of questions regarding raster analysis. Thought it would be good to redirect them over to the rioxarray repo.
cc @snowman2 @scottyhq","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6455/reactions"", ""total_count"": 3, ""+1"": 3, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1179192144,PR_kwDOAMm_X8407zU4,6409,Add kwarg-only breaking change to whats-new,2448579,closed,0,,,0,2022-03-24T08:47:39Z,2022-03-26T08:44:45Z,2022-03-26T08:44:43Z,MEMBER,,0,pydata/xarray/pulls/6409,"Closes #6408
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6409/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1174907042,PR_kwDOAMm_X840t0YV,6390,[skip-ci] Add benchmarks for groupby math,2448579,closed,0,,,0,2022-03-21T05:25:25Z,2022-03-21T07:51:18Z,2022-03-21T07:51:16Z,MEMBER,,0,pydata/xarray/pulls/6390,From #6160,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6390/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
1093730872,PR_kwDOAMm_X84wh3GX,6137,Add tests for groupby math,2448579,closed,0,,,0,2022-01-04T20:32:08Z,2022-01-13T00:02:04Z,2022-01-13T00:02:03Z,MEMBER,,0,pydata/xarray/pulls/6137,Adds some extra tests,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6137/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull
810593152,MDExOlB1bGxSZXF1ZXN0NTc1MjU4MzY0,4920,Fix some asv benchmarks,2448579,closed,0,,,0,2021-02-17T22:40:40Z,2022-01-05T18:57:26Z,2021-02-18T00:28:10Z,MEMBER,,0,pydata/xarray/pulls/4920,Mostly adjust to deprecated behaviour,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4920/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull