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 1924156612,PR_kwDOAMm_X85byrbF,8267,Use duck array ops in more places,85085,closed,0,,,1,2023-10-03T13:28:25Z,2023-10-05T18:41:20Z,2023-10-05T18:41:20Z,CONTRIBUTOR,,0,pydata/xarray/pulls/8267," This uses `duck_array_ops` in some more places that were found to cause failures in https://github.com/xarray-contrib/cubed-xarray/issues/8 - [ ] Closes #xxxx - [ ] Tests added - [x] 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/8267/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1720045908,PR_kwDOAMm_X85RCVSx,7862,CF encoding should preserve vlen dtype for empty arrays,85085,closed,0,,,17,2023-05-22T16:41:11Z,2023-06-16T07:00:35Z,2023-06-16T03:56:14Z,CONTRIBUTOR,,0,pydata/xarray/pulls/7862," - [x] Closes #7328 - [x] Tests added The idea is that it enables a workaround for #7328, where the dtype metadata can be set to a vlen string so that it doesn't get changed to float. The line that is changed in the example in #7328 is: ``` ds = xr.Dataset({""a"": np.array([], dtype=coding.strings.create_vlen_dtype(str))}) ``` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7862/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1466586967,I_kwDOAMm_X85XaldX,7328,Zarr store array dtype changes for empty object string,85085,closed,0,,,2,2022-11-28T15:05:14Z,2023-06-16T03:56:16Z,2023-06-16T03:56:16Z,CONTRIBUTOR,,,,"### What happened? Saving a dataset with an empty object (string) variable to zarr changes the dtype to float64. ### What did you expect to happen? The dtype should remain as `O`, just as it does for non-empty object variables. ### Minimal Complete Verifiable Example ```Python import numpy as np import xarray as xr ds = xr.Dataset({""a"": np.array([], dtype=""O"")}) ds[""a""].dtype # prints: dtype('O') ds.to_zarr(""a.zarr"") ds = xr.open_dataset(""a.zarr"") ds[""a""].dtype # prints: dtype('float64') ``` ### 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. ### Relevant log output _No response_ ### Anything else we need to know? _No response_ ### Environment
INSTALLED VERSIONS ------------------ commit: None python: 3.8.13 (default, Mar 28 2022, 06:16:26) [Clang 12.0.0 ] python-bits: 64 OS: Darwin OS-release: 21.6.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_GB.UTF-8 LOCALE: ('en_GB', 'UTF-8') libhdf5: None libnetcdf: None xarray: 2022.11.0 pandas: 1.5.0 numpy: 1.23.4 scipy: 1.9.2 netCDF4: None pydap: None h5netcdf: None h5py: None Nio: None zarr: 2.13.3 cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2022.10.0 distributed: 2022.10.0 matplotlib: 3.6.1 cartopy: None seaborn: 0.12.0 numbagg: None fsspec: 2022.8.2 cupy: None pint: None sparse: None flox: None numpy_groupies: None setuptools: 63.4.1 pip: 22.2.2 conda: None pytest: 7.1.3 IPython: 8.5.0 sphinx: 4.2.0
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7328/reactions"", ""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 1429920838,I_kwDOAMm_X85VOtxG,7243,Some aggregate operations using the array API fail,85085,open,0,,,0,2022-10-31T14:15:00Z,2023-01-15T16:02:00Z,,CONTRIBUTOR,,,,"### What happened? Here are some tests demonstrating the problem https://github.com/pydata/xarray/commit/9d6269de9fec4c66aeade2fdf9829c6e066a6eac: ``` FAILED xarray/tests/test_array_api.py::test_aggregation[max] - assert False FAILED xarray/tests/test_array_api.py::test_aggregation[min] - assert False FAILED xarray/tests/test_array_api.py::test_aggregation[mean] - assert False FAILED xarray/tests/test_array_api.py::test_aggregation[prod] - assert False FAILED xarray/tests/test_array_api.py::test_aggregation[std] - assert False FAILED xarray/tests/test_array_api.py::test_aggregation[var] - assert False FAILED xarray/tests/test_array_api.py::test_aggregation_skipna[std] - TypeError: std() got an unexpected keyword argument 'ddof' FAILED xarray/tests/test_array_api.py::test_aggregation_skipna[var] - TypeError: var() got an unexpected keyword argument 'ddof' ``` ### 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 _No response_ ### Anything else we need to know? _No response_ ### Environment
INSTALLED VERSIONS ------------------ commit: 9d6269de9fec4c66aeade2fdf9829c6e066a6eac python: 3.8.13 (default, Mar 28 2022, 06:16:26) [Clang 12.0.0 ] python-bits: 64 OS: Darwin OS-release: 21.6.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_GB.UTF-8 LOCALE: ('en_GB', 'UTF-8') libhdf5: None libnetcdf: None xarray: 2022.6.1.dev63+ge6791852a pandas: 1.5.0 numpy: 1.23.3 scipy: None netCDF4: None pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: None distributed: None matplotlib: None cartopy: None seaborn: None numbagg: None fsspec: None cupy: None pint: None sparse: None flox: None numpy_groupies: None setuptools: 63.4.1 pip: 22.1.2 conda: None pytest: 7.1.3 IPython: None sphinx: None
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7243/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 1502721600,PR_kwDOAMm_X85FxUrF,7387,Make `broadcast` and `concat` work with the Array API,85085,closed,0,,,1,2022-12-19T10:49:28Z,2023-01-06T14:18:08Z,2023-01-05T20:43:15Z,CONTRIBUTOR,,0,pydata/xarray/pulls/7387," - [ ] Closes #xxxx - [x] Tests added This change is needed to run @dcherian's Transformed Eulerian Mean diagnostic example in https://github.com/dcherian/ncar-challenge-suite/blob/main/tem.ipynb using the Array API (on Cubed, see https://github.com/tomwhite/cubed/issues/145).","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7387/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1382574245,PR_kwDOAMm_X84_b5H9,7067,More Array API changes,85085,closed,0,,,3,2022-09-22T14:43:46Z,2022-10-18T17:04:35Z,2022-10-18T17:04:35Z,CONTRIBUTOR,,0,pydata/xarray/pulls/7067,"Including aggregation with nans, astype, where, stack. This is a follow-on to #6804, delegating more functions to `np` or `xp` as appropriate. - [x] Tests added ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7067/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1307709199,PR_kwDOAMm_X847jiR4,6804,Support NumPy array API (experimental),85085,closed,0,,,1,2022-07-18T10:04:02Z,2022-07-21T17:43:20Z,2022-07-20T06:09:14Z,CONTRIBUTOR,,0,pydata/xarray/pulls/6804," - [x] Closes #3232 - [x] Tests added - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` Note: I haven't actually tested this with pytorch (which is the motivating example for #3232).","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6804/reactions"", ""total_count"": 9, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 9, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1165278675,PR_kwDOAMm_X840PayU,6348,Allow write_empty_chunks to be set in Zarr encoding,85085,closed,0,,,1,2022-03-10T14:12:21Z,2022-03-17T16:14:37Z,2022-03-17T04:52:10Z,CONTRIBUTOR,,0,pydata/xarray/pulls/6348,"- [x] Closes #6347 - [ ] 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/6348/reactions"", ""total_count"": 3, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 3, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1165277802,I_kwDOAMm_X85FdLpq,6347,Can't set write_empty_chunks in Zarr encoding,85085,closed,0,,,0,2022-03-10T14:11:36Z,2022-03-17T04:52:10Z,2022-03-17T04:52:10Z,CONTRIBUTOR,,,,"### What happened? Zarr 2.11.0 made [a change where chunks with data equal to the fill value are no longer written to disk by default](https://zarr.readthedocs.io/en/stable/release.html#release-2-11-0). I would like to override the default, but this isn't possible using xarray's `to_zarr`. ### What did you expect to happen? _No response_ ### Minimal Complete Verifiable Example ```Python import numpy as np import xarray as xr ds = xr.Dataset({""x"": ((""d1""), np.full((2,), np.nan))}) ds.to_zarr(""/tmp/ds.zarr"", encoding={""x"": {""write_empty_chunks"":True}}) ``` ### Relevant log output ```Python Traceback (most recent call last): File """", line 1, in File ""/Users/tom/miniconda/envs/sgkit-3.8/lib/python3.8/site-packages/xarray/core/dataset.py"", line 2036, in to_zarr return to_zarr( File ""/Users/tom/miniconda/envs/sgkit-3.8/lib/python3.8/site-packages/xarray/backends/api.py"", line 1431, in to_zarr dump_to_store(dataset, zstore, writer, encoding=encoding) File ""/Users/tom/miniconda/envs/sgkit-3.8/lib/python3.8/site-packages/xarray/backends/api.py"", line 1119, in dump_to_store store.store(variables, attrs, check_encoding, writer, unlimited_dims=unlimited_dims) File ""/Users/tom/miniconda/envs/sgkit-3.8/lib/python3.8/site-packages/xarray/backends/zarr.py"", line 534, in store self.set_variables( File ""/Users/tom/miniconda/envs/sgkit-3.8/lib/python3.8/site-packages/xarray/backends/zarr.py"", line 581, in set_variables encoding = extract_zarr_variable_encoding( File ""/Users/tom/miniconda/envs/sgkit-3.8/lib/python3.8/site-packages/xarray/backends/zarr.py"", line 220, in extract_zarr_variable_encoding raise ValueError( ValueError: unexpected encoding parameters for zarr backend: ['write_empty_chunks'] ``` ### Anything else we need to know? _No response_ ### Environment INSTALLED VERSIONS ------------------ commit: None python: 3.8.12 (default, Oct 12 2021, 06:23:56) [Clang 10.0.0 ] python-bits: 64 OS: Darwin OS-release: 19.6.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_GB.UTF-8 LOCALE: ('en_GB', 'UTF-8') libhdf5: None libnetcdf: None xarray: 2022.3.0 pandas: 1.3.5 numpy: 1.21.5 scipy: 1.7.3 netCDF4: None pydap: None h5netcdf: None h5py: None Nio: None zarr: 2.11.0 cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2022.01.0 distributed: 2022.01.0 matplotlib: 3.5.1 cartopy: None seaborn: 0.11.2 numbagg: None fsspec: 2022.01.0 cupy: None pint: None sparse: None setuptools: 58.0.4 pip: 21.2.4 conda: None pytest: 6.2.5 IPython: 8.0.1 sphinx: 4.2.0","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6347/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 870782371,MDExOlB1bGxSZXF1ZXN0NjI1OTE3OTQy,5235,Fix exception when display_expand_data=False for file-backed array.,85085,closed,0,,,4,2021-04-29T08:57:50Z,2021-05-06T16:42:45Z,2021-05-06T16:42:45Z,CONTRIBUTOR,,0,pydata/xarray/pulls/5235," - [X] Closes #4229 - [x] Tests added - [x] Passes `pre-commit run --all-files` See discussion in https://github.com/pydata/xarray/pull/5126#pullrequestreview-645689987","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5235/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 852280544,MDExOlB1bGxSZXF1ZXN0NjEwNTYwMjkw,5126,Add options to control expand/collapse of sections in display of Dataset and DataArray,85085,closed,0,,,9,2021-04-07T10:51:03Z,2021-04-29T08:58:25Z,2021-04-27T01:37:54Z,CONTRIBUTOR,,0,pydata/xarray/pulls/5126," - [x] Closes #4229 - [x] Tests added - [x] Passes `pre-commit run --all-files` - [x] 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/5126/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull