Releases: pydata/xarray
v2025.10.1
This release actually reverts a breaking change to Xarray's preferred netCDF backend.
v2025.10.0
This release reverts a breaking change to Xarray's preferred netCDF backend.
v2025.09.1
This release contains improvements to netCDF IO and the DataTree.from_dict() constructor, as well as a variety of bug fixes. In particular, the default netCDF backend has switched from netCDF4 to h5netcdf, which is typically faster.
Thanks to the 17 contributors to this release: Claude, Deepak Cherian, Dimitri Papadopoulos Orfanos, Dylan H. Morris, Emmanuel Mathot, Ian Hunt-Isaak, Joren Hammudoglu, Julia Signell, Justus Magin, Maximilian Roos, Nick Hodgskin, Spencer Clark, Stephan Hoyer, Tom Nicholas, gronniger, joseph nowak and pierre-manchon
v2025.09.0
This release brings a number of small improvements and fixes, especially related to writing DataTree objects and netCDF files to disk.
Thanks to the 13 contributors to this release: Benoit Bovy, DHRUVA KUMAR KAUSHAL, Deepak Cherian, Dhruva Kumar Kaushal, Giacomo Caria, Ian Hunt-Isaak, Illviljan, Justus Magin, Kai Mühlbauer, Ruth Comer, Spencer Clark, Stephan Hoyer and Tom Nicholas
New Features
Support rechunking by SeasonResampler for seasonal data analysis (GH10425, PR10519). By Dhruva Kumar Kaushal.
Add convenience methods to Coordinates (PR10318) By Justus Magin.
Added load_datatree() for loading DataTree objects into memory from disk. It has the same relationship to open_datatree(), as load_dataset() has to open_dataset(). By Stephan Hoyer.
compute=False is now supported by DataTree.to_netcdf() and DataTree.to_zarr(). By Stephan Hoyer.
open_dataset will now correctly infer a path ending in .zarr/ as zarr By Ian Hunt-Isaak.
Breaking changes
Following pandas 3.0 (pandas-dev/pandas#61985), Day is no longer considered a Tick-like frequency. Therefore non-None values of offset and non-"start_day" values of origin will have no effect when resampling to a daily frequency for objects indexed by a xarray.CFTimeIndex. As in pandas-dev/pandas#62101 warnings will be emitted if non default values are provided in this context (GH10640, PR10650). By Spencer Clark.
The default backend engine used by Dataset.to_netcdf() and DataTree.to_netcdf() is now chosen consistently with open_dataset() and open_datatree(), using whichever netCDF libraries are available and valid, and preferring netCDF4 to h5netcdf to scipy (GH10654). This will change the default backend in some edge cases (e.g., from scipy to netCDF4 when writing to a file-like object or bytes). To override these new defaults, set engine explicitly. By Stephan Hoyer.
The return value of Dataset.to_netcdf() without path is now a memoryview object instead of bytes (PR10656). This removes an unnecessary memory copy and ensures consistency when using either engine="scipy" or engine="h5netcdf". If you need a bytes object, simply wrap the return value of to_netcdf() with bytes(). By Stephan Hoyer.
Bug fixes
Fix contour plots not normalizing the colors correctly when using for example logarithmic norms. (GH10551, PR10565) By Jimmy Westling.
Fix distribution of auto_complex keyword argument for open_datatree (GH10631, PR10632). By Kai Mühlbauer.
Warn instead of raise in case of misconfiguration of unlimited_dims originating from dataset.encoding, to prevent breaking users workflows (GH10647, PR10648). By Kai Mühlbauer.
DataTree.to_netcdf() and DataTree.to_zarr() now avoid redundant computation of Dask arrays with cross-group dependencies (GH10637). By Stephan Hoyer.
DataTree.to_netcdf() had h5netcdf hard-coded as default (GH10654). By Stephan Hoyer.
Internal Changes
Run TestNetCDF4Data as TestNetCDF4DataTree through open_datatree (PR10632). By Kai Mühlbauer.
v2025.08.0
This release brings the ability to load xarray objects asynchronously, write netCDF as bytes, fixes a number of bugs, and starts an important deprecation cycle for changing the default values of keyword arguments for various xarray combining functions.
Thanks to the 24 contributors to this release:
Alfonso Ladino, Brigitta Sipőcz, Claude, Deepak Cherian, Dimitri Papadopoulos Orfanos, Eric Jansen, Ian Hunt-Isaak, Ilan Gold, Illviljan, Julia Signell, Justus Magin, Kai Mühlbauer, Mathias Hauser, Matthew, Michael Niklas, Miguel Jimenez, Nick Hodgskin, Pratiman, Scott Staniewicz, Spencer Clark, Stephan Hoyer, Tom Nicholas, Yang Yang and jemmajeffree
What's Changed
- Add dev whats-new by @dcherian in #10522
- Improve warning message and tests for timedelta decoding by @shoyer in #10508
- Remove test skip by @VeckoTheGecko in #10523
- Pydap flaky tests by @Mikejmnez in #10525
- drop_vars: use emit_user_level_warning by @mathause in #10528
- Fix labeler for
topic-documentation
by @VeckoTheGecko in #10524 - CI: update actions location by @bsipocz in #10529
- Call
super().__init__()
inst.SearchStrategy
subclasses by @spencerkclark in #10543 - Fix kerchunk error in docs build by @dcherian in #10545
- Fix convert calendar with different dimension name by @ej81 in #10544
- Restructure API documentation into organized sections by @dcherian in #10540
- Unnecessary literal by @DimitriPapadopoulos in #10552
- Fix
DatetimeAccessor.strftime
errors due to upstream changes by @spencerkclark in #10550 - Fix transpose of BoolTypeArray, NativeEndiannessArray by @dcherian in #10546
- Pythagorean calculation with sub-optimal numerics by @DimitriPapadopoulos in #10575
- interp - Prefer broadcast over reindex when possible by @Illviljan in #10554
- Update documentation to copy tags when forking, so versioning is reasonable by @jemmajeffree in #10576
- install
pyarrow
from its official repo by @keewis in #10577 - fix: Filter out
StringDType
even when the backing array is notNumpyExtensionArray
by @ilan-gold in #10559 - fix: pd.Series in pandas>=3 does not preserve object dtype metadata by @ilan-gold in #10564
- Fix
_get_default_engine_netcdf
to check forh5netcdf
by @scottstanie in #10557 pre-commit
hook maintenance:typos
by @keewis in #10586- bump the build metadata by @keewis in #10592
- New defaults for
concat
,merge
,combine_*
by @jsignell in #10062 - Fix doctests by ignoring warning from netcdf by @jsignell in #10599
- Fix typo found by codespell by @DimitriPapadopoulos in #10601
- change the type of
ogp_custom_meta_tags
totuple
by @keewis in #10603 - Fix docstring in find_independent_seasons by @Illviljan in #10615
- Make warning message clearer when assigning to
PandasMultiIndex
by @jsignell in #10610 - Update pre-commit hooks by @pre-commit-ci[bot] in #10604
- Support for DataTree.to_netcdf to write to a file-like object or bytes by @mjwillson in #10571
- add kwarg to handle invalid files in open_mfdataset by @pratiman-91 in #9955
- Bump actions/download-artifact from 4 to 5 in the actions group by @dependabot[bot] in #10621
- Sanitize unlimited_dims when writing
to_netcdf
by @kmuehlbauer in #10608 - slicing a slice with an array without expanding the slice by @keewis in #10580
- Skip call to
.tolist()
when creating pd.Index by @y4n9squared in #10619 - fix: Empty
RangeIndex
Display by @ianhi in #10594 - clarify lazy behaviour and eager loading chunks=None in open_*-functions by @kmuehlbauer in #10627
- Avoid refining parent dimensions in NetCDF files by @shoyer in #10623
- Add DataTree.prune() method … by @aladinor in #10598
- Add asynchronous load method by @TomNicholas in #10327
- Fix
ds.merge
to prevent altering original object depending on join value by @jsignell in #10596 - release notes for v2025.08.0 by @TomNicholas in #10641
New Contributors
- @bsipocz made their first contribution in #10529
- @jemmajeffree made their first contribution in #10576
- @mjwillson made their first contribution in #10571
- @pratiman-91 made their first contribution in #9955
- @y4n9squared made their first contribution in #10619
Full Changelog: v2025.07.1...v2025.08.0
v2025.07.1
What's Changed
- New whatsnew section by @TomNicholas in #10496
- Update HOW_TO_RELEASE.md to reflect inability to push to main by @TomNicholas in #10497
- Enforce ruff/flake8-simplify rules (SIM) by @DimitriPapadopoulos in #10480
- Unnecessary generator by @DimitriPapadopoulos in #10506
- Use
is
when comparing type of two objects by @DimitriPapadopoulos in #10504 - More f-strings, less format() by @DimitriPapadopoulos in #10505
- Unnecessary lambda expression by @DimitriPapadopoulos in #10502
- Clean-up indexing adapter classes by @benbovy in #10355
- Add NDPointIndex (KDTree) by @benbovy in #10478
- Use a set comprehension by @DimitriPapadopoulos in #10509
- Update pre-commit ruff legacy alias by @DimitriPapadopoulos in #10511
- DOC: add Pandas(Multi)Index to API reference by @benbovy in #10515
- Allow setting (or skipping) new indexes in open_dataset by @benbovy in #8051
- Raise if
Index.create_variables
returns more variables than passed in throughset_xindex
by @dhruvak001 in #10503 - Expression not assigned by @DimitriPapadopoulos in #10507
- Update Custom Indexes section in api.rst by @dcherian in #10517
- Updates for Zarr 3 Dtypes by @ianhi in #10456
- Add release notes for v2025.07.1 by @dcherian in #10520
Full Changelog: v2025.07.0...v2025.07.1
v2025.07.0
This release extends xarray's support for custom index classes, restores support for reading netCDF3 files with SciPy, updates minimum dependencies, and fixes a number of bugs.
Thanks to the 17 contributors to this release:
Bas Nijholt, Benoit Bovy, Deepak Cherian, Dhruva Kumar Kaushal, Dimitri Papadopoulos Orfanos, Ian Hunt-Isaak, Kai Mühlbauer, Mathias Hauser, Maximilian Roos, Miguel Jimenez, Nick Hodgskin, Scott Henderson, Shuhao Cao, Spencer Clark, Stephan Hoyer, Tom Nicholas and Zsolt Cserna
What's Changed
- new whats-new section by @mathause in #10420
- Fix Pydap tests for numpy 2.3.0 changes (scalar string to unicode) by @kmuehlbauer in #10421
- Fixed color.shape != grid.shape in streamplot when nx != ny by @scaomath in #10411
- Fix
Index._repr_inline_()
signature by @benbovy in #10415 - Clean up backend indexing some more by @dcherian in #10376
- Check and fix chararray string dimension names by @kmuehlbauer in #10395
- Fix reindex on Dataset from MultiIndex DataFrame with RuntimeError by @csernazs in #10381
- Apply new ruff rules by @DimitriPapadopoulos in #10428
- BUG: Fix display with nested NumPy arrays by @basnijholt in #10222
- DOC: Add cf_xarray to ecosystem page by @VeckoTheGecko in #10443
- Expose top-level xarray.indexes in init by @dcherian in #10435
- fix assert_equal for DataTree by @mathause in #10440
- Use a set comprehension by @DimitriPapadopoulos in #10453
- Redundant list comprehension can be replaced using generator by @DimitriPapadopoulos in #10454
- Simplify chained comparison between the operands by @DimitriPapadopoulos in #10447
- Unassigned string statement by @DimitriPapadopoulos in #10452
- Iterate the dictionary directly instead of calling
.keys()
by @DimitriPapadopoulos in #10451 - Unnecessary tuple/list literal by @DimitriPapadopoulos in #10450
- Unreachable code by @DimitriPapadopoulos in #10449
- Appending to dictionary immediately following its definition by @DimitriPapadopoulos in #10448
- Exceptions are overlapping by @DimitriPapadopoulos in #10446
- Enforce ruff/Pylint Warnings (PLW) by @DimitriPapadopoulos in #10458
- Update pre-commit hook pre-commit by @DimitriPapadopoulos in #10461
- Enforce ruff/Pylint Refactor rules (PLR) by @DimitriPapadopoulos in #10459
- Enforce ruff/Pylint Convention rules (PLC) by @DimitriPapadopoulos in #10460
- Switch to using the NumFOCUS Code of Conduct by @shoyer in #10432
- More Pylint issues by @DimitriPapadopoulos in #10463
- More f-strings, less format() by @DimitriPapadopoulos in #10474
- Enforce ruff/flake8-2020 rules (YTT) by @DimitriPapadopoulos in #10467
- assert_equal: ensure check_dim_order=False works for DataTree by @mathause in #10442
- Keyword argument passed twice by @DimitriPapadopoulos in #10473
- Branches of the
if
statement have similar implementation by @DimitriPapadopoulos in #10475 - Enforce ruff/flake8-simplify rules (SIM) by @DimitriPapadopoulos in #10462
- Apply assorted ruff preview rules by @DimitriPapadopoulos in #10465
- Revert "Enforce ruff/flake8-simplify rules (SIM)" by @max-sixty in #10476
- Fix RangeIndex slicing by @benbovy in #10471
- Update error message regex for latest Zarr by @dcherian in #10485
- update dependencies; drop python 3.10 by @dhruvak001 in #10438
- Fix critical
np.timedelta64
encoding bugs by @spencerkclark in #10469 - Prevent pydap (dap4) to change string arrays to unicode type (testing). Fixed upstream by @Mikejmnez in #10482
- Downgrade zarr requests performance expectations for zarr 3.0.9 by @TomNicholas in #10491
- Use add_note() to annotate exceptions when encoding fails by @shoyer in #10464
- Check if zarr store supports consolidated metadata by @TomNicholas in #10457
- Fix Zarr 'number of requests' test by @ianhi in #10492
- Rename toplevel header from Contribute to Development by @scottyhq in #10472
- Release workflows: always check that the built dist is valid. by @dcherian in #10408
- Fix bug with
ci/release_contributors.py
script by @TomNicholas in #10494 - Release notes for v2025.07.0 by @TomNicholas in #10495
New Contributors
- @scaomath made their first contribution in #10411
- @csernazs made their first contribution in #10381
- @basnijholt made their first contribution in #10222
- @dhruvak001 made their first contribution in #10438
Full Changelog: v2025.06.1...v2025.07.0
v2025.06.1
This is quick bugfix release to remove an unintended dependency on typing_extensions
. Apologies for the trouble.
What's Changed
- Guard typing_extension import by @sjperkins in #10413
- (fix): disallow
NumpyExtensionArray
by @ilan-gold in #10334 - (fix):
ndim
accessible asnp.ndim
onPandasExtensionArray
by @ilan-gold in #10414 - Up-to-date instructions for reading & writing to Zarr with Xarray by @alxmrs in #10410
- Release 2025.06.1 by @dcherian in #10416
New Contributors
Full Changelog: v2025.06.0...v2025.06.1
v2025.06.0
This release brings HTML reprs to the documentation, fixes to flexible Xarray indexes, performance optimizations, more ergonomic seasonal grouping and resampling
with new SeasonGrouper and SeasonResampler objects, and bugfixes.
Thanks to the 33 contributors to this release:
Andrecho, Antoine Gibek, Benoit Bovy, Brian Michell, Christine P. Chai, David Huard, Davis Bennett, Deepak Cherian, Dimitri Papadopoulos Orfanos, Elliott Sales de Andrade, Erik, Erik Månsson, Giacomo Caria, Ilan Gold, Illviljan, Jesse Rusak, Jonathan Neuhauser, Justus Magin, Kai Mühlbauer, Kimoon Han, Konstantin Ntokas, Mark Harfouche, Michael Niklas, Nick Hodgskin, Niko Sirmpilatze, Pascal Bourgault, Scott Henderson, Simon Perkins, Spencer Clark, Tom Vo, Trevor James Smith, joseph nowak and micguerr-bopen
What's Changed
- Add
xarray-lmfit
extension for curve fitting to ecosystem documentation by @kmnhan in #10262 - Rename Twitter to X by @star1327p in #10283
- Add public typing.py module by @micguerr-bopen in #10215
- Adding xarray-eopf to ecosystem.rst by @konstntokas in #10289
- Add redirect for contributing guide by @scottyhq in #10282
- Add Index.should_add_coord_to_array by @benbovy in #10137
- Fix for scalar detection by @huard in #8821
- DOC: Remove reference to
absolufy-imports
from contributing guide by @VeckoTheGecko in #10290 - Do not rely on np.broadcast_to to perform trivial dimension insertion by @hmaarrfk in #10277
- (fix): remove
PandasExtensionArray
from repr by @ilan-gold in #10291 - Add SeasonGrouper, SeasonResampler by @dcherian in #9524
- dev whats-new by @dcherian in #10294
- Add back getattr for ExtensionArrays by @dcherian in #10278
- (fix): allow upcasting of nans in
as_shared_dtype
for extension arrays by @ilan-gold in #10292 - Fix BinGrouper when labels is not specified by @dcherian in #10295
- (fix): numeric
arrow
dtype deep copies by @ilan-gold in #10315 - Fix rolling mean on bool arrays by @gcaria in #10319
- Alignment of n-dimensional indexes with partially excluded dims by @benbovy in #10293
- FIX: prevent unnecessary type casts in rolling mean by @kmuehlbauer in #10341
- Remove
"Y"
and"M"
fromDatetimeUnitOptions
by @spencerkclark in #10306 - fix roundtripping zero-size timedelta arrays by @kmuehlbauer in #10313
- Implement literal
np.timedelta64
coding by @spencerkclark in #10101 - Set
.conjugate
as alias of.conj
, #10302 by @joneuhauser in #10303 - Fix setuptools deprecation warnings by @gcaria in #10300
- The URL in CONTRIBUTING.md was broken and didn't automatically redirect. by @erik-mansson in #10351
- Disallow standard calendar
np.datetime64
encoding prior to reform by @spencerkclark in #10352 - Docs: User Guide for Complex Numbers by @andrewendlinger in #10235
- Avoid copying vectorized indexes by @jder in #10316
- apply_ufunc: don't modify attrs on input variables by @erik-mansson in #10330
- ruff: default rule set by @DimitriPapadopoulos in #10360
- Fix "a array" misspelling by @DimitriPapadopoulos in #10365
- Apply assorted ruff/flake8-pytest-style rules (PT) by @DimitriPapadopoulos in #10363
- Apply assorted ruff/flake8-simplify rules (SIM) by @DimitriPapadopoulos in #10364
- Ignore ruff/Pyflakes rule F401 more precisely by @DimitriPapadopoulos in #10369
- Enforce ruff/refurb rules (FURB) by @DimitriPapadopoulos in #10367
- Enforce ruff/flake8-implicit-str-concat rules (ISC) by @DimitriPapadopoulos in #10368
- (fix): pandas extension array repr for int64[pyarrow] by @ilan-gold in #10317
- Apply assorted ruff/Pylint rules (PL) / Enforce PLE rules by @DimitriPapadopoulos in #10366
- Enforce ruff/flake8-pyi rules (PYI) by @DimitriPapadopoulos in #10359
- Implement cftime vectorization as discussed in PR #8322 by @antscloud in #8324
- Fix doc typo for caption "Interoperability" by @tomvothecoder in #10374
- use numpy dtype exposed by zarr array instead of metadata.data_type by @d-v-b in #10348
- Pin Mypy to 1.15 by @kmuehlbauer in #10378
- Improve html repr in dark mode (Jupyterlab + Xarray docs) by @benbovy in #10353
- Add missing AbstractWritableDataStore base methods and arguments by @sjperkins in #10343
- Enforce ruff/flynt rules (FLY) by @DimitriPapadopoulos in #10375
- Docs: Add links to getting help mermaid diagram by @scottyhq in #10324
- Grouper tweaks. by @dcherian in #10362
- html repr: improve style for dropdown sections by @benbovy in #10354
- Fix performance regression in interp from #9881 by @dcherian in #10370
- Avoid unsafe casts from float to unsigned int by @QuLogic in #9964
- DOC: Update link to Cartopy reference by @star1327p in #10386
- Update a link in ROMS_ocean_model.ipynb by @star1327p in #10394
- Automatic Dask-Zarr chunk alignment by @josephnowak in #10336
- added movement to Xarray related projects by @niksirbi in #10403
- Update concat for multi-variable indexes. by @dcherian in #10371
- Switch docs to jupyter-execute sphinx extension for HTML reprs by @scottyhq in #10383
- Adds chunk key encoding to kwargs passed to zarr by @BrianMichell in #10274
- Release v2025.06.0 by @dcherian in #10406
New Contributors
- @kmnhan made their first contribution in #10262
- @star1327p made their first contribution in #10283
- @micguerr-bopen made their first contribution in #10215
- @konstntokas made their first contribution in #10289
- @joneuhauser made their first contribution in #10303
- @erik-mansson made their first contribution in #10351
- @jder made their first contribution in #10316
- @sjperkins made their first contribution in #10343
- @niksirbi made their first contribution in #10403
- @BrianMichell made their first contribution in #10274
Full Changelog: v2025.04.0...v2025.06.0
v2025.04.0
This release brings bug fixes, better support for extension arrays including returning a
pandas.IntervalArray
from groupby_bins
, and performance improvements.
Thanks to the 24 contributors to this release:
Alban Farchi, Andrecho, Benoit Bovy, Deepak Cherian, Dimitri Papadopoulos Orfanos, Florian Jetter, Giacomo Caria, Ilan Gold, Illviljan, Joren Hammudoglu, Julia Signell, Kai Muehlbauer, Kai Mühlbauer, Mathias Hauser, Mattia Almansi, Michael Sumner, Miguel Jimenez, Nick Hodgskin (🦎 Vecko), Pascal Bourgault, Philip Chmielowiec, Scott Henderson, Spencer Clark, Stephan Hoyer and Tom Nicholas
What's Changed
- Add new whats-new section by @dcherian in #10190
- DOC: Remove mention of netcdf pypi package by @VeckoTheGecko in #10197
- Apply ruff preview rule RUF046 by @DimitriPapadopoulos in #10199
- Fix sparse dask repr test by @dcherian in #10200
- add
scipy-stubs
as extra[types]
dependency by @jorenham in #10202 - Fix references to core classes in docs by @malmans2 in #10207
- Fixes dimension order in
xarray.Dataset.to_stacked_array
by @aFarchi in #10205 - CI: Automatic PR labelling is back by @VeckoTheGecko in #10201
- Add datatree repr asv by @Illviljan in #10214
DatasetView.map
fixkeep_attrs
by @mathause in #10219- Fix broken Sphinx Roles by @philipc2 in #10225
- Fix doctests by @jsignell in #10230
- Fix mypy failures on main by @jsignell in #10232
- Add RangeIndex by @benbovy in #10076
- opendap / dap4 support for pydap backend by @Mikejmnez in #10182
- Fix: Docs generation create temporary files that are not cleaned up. by @andrewendlinger in #10238
- Remove
test_dask_layers_and_dependencies
by @fjetter in #10242 - Fix mypy, min-versions CI, xfail Zarr tests by @dcherian in #10255
- Switch documentation to pydata-sphinx-theme by @TomNicholas in #8708
- Support extension array indexes by @ilan-gold in #9671
- Update how-to-add-new-backend.rst by @mdsumner in #10240
- Improve alignment checks by @benbovy in #10251
- Avoid stacking when grouping by chunked array by @dcherian in #10254
- BinGrouper: Support setting labels when provided with IntervalIndex by @dcherian in #10259
- Fix infinite recursion when calling
np.fix
by @gcaria in #10248 - Fix benchmarks runners by @dcherian in #10265
- Shorten text repr for
DataTree
by @jsignell in #10139 - Fix reduction by subset of grouper dimensions by @dcherian in #10258
- BinGrouper: reduce indirection by @dcherian in #10270
- Fix convert calendar on non-temporal data in datasets by @aulemahal in #10268
- add return_scalar=False as array_wrap kwarg by @gcaria in #10264
- GroupBy: Finish eagerly_compute_group deprecation by @dcherian in #10253
- (fix): remove
_getattr__
method forPandasExtensionArray
by @ilan-gold in #10250 - Release notes for 2025.04.0 by @dcherian in #10272
New Contributors
- @jorenham made their first contribution in #10202
- @aFarchi made their first contribution in #10205
- @mdsumner made their first contribution in #10240
Full Changelog: v2025.03.1...v2025.04.0