Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 86 additions & 40 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,34 @@
What's New
==========

.. _whats-new.2026.07.1:
.. _whats-new.2026.09.0:

v2026.07.1 (unreleased)
-----------------------
v2026.09.0 (Sep 29, 2026)
-------------------------

This release adds read support for Zarr V3 rectilinear (variable-sized) chunks,
Arrow PyCapsule export for :py:class:`DataArray`, a new
:py:meth:`DataArray.plot.lines` plotting method, :py:class:`DataTree` support
in :py:func:`apply_ufunc`, and flox-accelerated groupby medians. Bottleneck is
now disabled by default, the remaining zarr-python 2 compatibility code has been
removed, and the minimum ``h5netcdf`` version is now 1.8. It also includes many
bug fixes.

.. warning::

This is the last xarray release that will support Python 3.11. Future
releases will require Python 3.12 or later.

Thanks to the 45 contributors to this release:
ANIRUDDHA ADAK, Ahmet Kamer Çivi, Albert Yau, Andrew Scherer, Anirban Mandal,
Aryan Singh K., Asish Kumar, Chandan P, Charles Turner, Deepak Cherian, Devraj
Pal, Dipak Chaudhari, Eltsefon Mark, Evan Lyall, Illviljan, Joe Hamman, Johnson
K C, Jules Chéron, Justus Magin, Kropiunig, Marcus Campbell, Mark Harfouche,
Matt Van Horn, Matthew Rocklin, Matthias Schabel, Michael Niklas, Nick
Hodgskin, Patrick N. Raanes, Peter Hron, Puneet Dixit, QinXi, Samuel Le
Meur-Diebolt, Spencer Clark, Stanley C, Stephan Hoyer, Thomas Kluyver, Tom
Nicholas, dsk0425-sketch, genrichez, hushen, imam, omsatpute61-afk, stepit, whn
and ✨Sarah Z✨

New Features
~~~~~~~~~~~~
Expand All @@ -23,12 +47,18 @@ New Features

- Added `PyArrowCapsule interface <https://arrow.apache.org/docs/format/CDataInterface/PyCapsuleInterface.html#arrow-pycapsule-interface>`_
to :py:class:`DataArray` (``__arrow_c_schema__`` and ``__arrow_c_stream__``), enabling near zero-copy
export to pyarrow, polars or duckdb.
export to pyarrow, polars or duckdb (:pull:`11338`).
By `Jules Chéron <https://github.com/jules-ch>`_.

- Added new plot method :py:meth:`DataArray.plot.lines` which allows creating line plots efficiently in
a similar manner to :py:meth:`DataArray.plot.scatter`, also available for datasets. (:pull:`7173`)
By `Jimmy Westling <https://github.com/illviljan>`_.

- :py:func:`apply_ufunc` now accepts :py:class:`DataTree` inputs, applying
``func`` to the datasets at each node and returning trees with the same
structure (:pull:`11552`).
By `QinXi <https://github.com/QinXi-ai>`_.

- The ``h5netcdf`` backend now reports compression and filter settings in the
variable ``encoding`` consistently with the ``netCDF4`` backend (using
``h5netcdf``'s ``Variable.filters()``). This means data compressed with codecs
Expand All @@ -40,7 +70,8 @@ New Features
Breaking Changes
~~~~~~~~~~~~~~~~
- Disable using bottleneck by default, as certain operations are less numerically
stable than the equivalent numpy functions.
stable than the equivalent numpy functions. Use
``xr.set_options(use_bottleneck=True)`` to opt back in (:pull:`11461`).
By `Thomas Kluyver <https://github.com/takluyver>`_.
- All remaining zarr-python 2.x compatibility code has been removed from the
zarr backend, following the bump of the minimum ``zarr`` version to 3.0.
Expand All @@ -59,11 +90,33 @@ Breaking Changes

Deprecations
~~~~~~~~~~~~
- Passing ``keepdims`` to groupby, resample or rolling reductions (e.g.
``ds.rolling(time=12).mean(keepdims=True)``) now emits a ``FutureWarning``.
The argument was previously silently ignored or produced unexpected shapes
(:issue:`11518`, :pull:`11521`).
By `Charles Turner <https://github.com/charles-turner-1>`_.


Bug Fixes
~~~~~~~~~

- Treat a full ``MultiIndex`` key with tuple-valued levels as scalar selection,
so ``.sel`` no longer preserves a length-1 dimension for nested tuple keys
that identify a single row (:issue:`11341`, :pull:`11348`).
- Warn when tuple-style ``DataArray`` coordinates are renamed by explicitly
provided dimension names (:issue:`11234`, :pull:`11292`).
By `Asish Kumar <https://github.com/officialasishkumar>`_.
- Preserve non-grouped coordinates in fallback ``groupby`` reductions when grouping
by a non-leading dimension reorders the underlying variable dimensions
(:issue:`11188`, :pull:`11290`).
By `Sarthak <https://github.com/Sarthak160>`_.
- Fix :py:meth:`Dataset.chunk` and :py:meth:`DataArray.chunk` raising
``ZeroDivisionError`` when using ``"auto"`` chunks on an object that has
a zero-length dimension (:pull:`11486`).
By `Charles Turner <https://github.com/charles-turner-1>`_.
- Fix the shape of a :py:class:`~xarray.indexes.CoordinateTransformIndex`-backed
coordinate after ``.transpose()`` for non-square arrays (:pull:`11513`).
By `Samuel Le Meur-Diebolt <https://github.com/sdiebolt>`_.
- Fix a bug in the ``scipy`` backend where mixing non-adjacent scalar and
array indexers in :py:meth:`Dataset.sel` could silently transpose
dimension sizes when reading from a closed file object
Expand All @@ -76,11 +129,12 @@ Bug Fixes
By `Alexander Kropiunig <https://github.com/Kropiunig>`_.
- ``min`` and ``max`` of object arrays with ``skipna=False`` now return ``NaN``
for slices containing missing values, instead of a result that depended on
the position of the missing value (:issue:`11501`, :pull:`#11627`).
the position of the missing value (:issue:`11501`, :pull:`11627`).
By `Michael Niklas <https://github.com/headtr1ck>`_.
- Avoid pandas' deprecated ``Series.values`` when creating a
:py:class:`~xarray.Variable` from a timezone-aware :py:class:`pandas.Series`
(:issue:`11501`, :pull:`#11627`).
(:issue:`11501`, :pull:`11627`).
By `Michael Niklas <https://github.com/headtr1ck>`_.
- Fix deadlocks when reading and writing netCDF files with dask at the same
time. Combined locks now always acquire their locks in the same order, which
previously depended on memory addresses, and a failed non-blocking acquire,
Expand All @@ -103,27 +157,23 @@ Bug Fixes
index instead of an empty index when the interval direction conflicts with
the sign of ``step`` (:pull:`11623`).
By `Ahmet Kamer Çivi <https://github.com/lowgame>`_.
- Fix async zarr tests using ``wraps`` with ``autospec=True`` on async methods,
which caused ``AsyncMock`` objects to leak through instead of real array data
(:pull:`11232`).
By `Joe Hamman <https://github.com/jhamman>`_.
- Preserve NumPy ``StringDType`` variables and coordinates in Zarr format 3
round trips (:issue:`11466`, :pull:`11474`).
By `stanbot8 <https://github.com/stanbot8>`_.
- Fixed dask-backed bottleneck rolling reductions declaring a dtype that could
differ from the dtype returned by the matching numpy-backed bottleneck path,
notably ``object`` instead of ``float64`` for boolean inputs.
notably ``object`` instead of ``float64`` for boolean inputs (:pull:`11449`).
By `Matthew Rocklin <https://github.com/mrocklin>`_.
- Fix :py:func:`~xarray.plot.utils.label_from_attrs` breaking LaTeX axis labels
when ``textwrap.wrap`` splits the string between adjacent ``$...$`` blocks,
producing invalid ``$$`` sequences that matplotlib cannot render
(:issue:`11452`).
(:issue:`11452`, :pull:`11476`).
By `Gen Richez <https://github.com/genrichez>`_.
- Fixed :py:meth:`Dataset.stack` raising ``KeyError`` when a stacked dimension
has a falsy but valid name such as ``""``, ``False`` or ``0`` (:issue:`9969`).
has a falsy but valid name such as ``""``, ``False`` or ``0`` (:issue:`9969`, :pull:`11477`).
By `JOhnsonKC201 <https://github.com/JOhnsonKC201>`_.
- :py:func:`polyval` now propagates ``NaN`` for ``NaT`` entries in ``timedelta64``
coordinates instead of returning a large sentinel value (:issue:`11462`).
coordinates instead of returning a large sentinel value (:issue:`11462`, :pull:`11478`).
By `Dipak Chaudhari <https://github.com/dchaudhari7177>`_.
- The zarr backend now writes boolean arrays with native ``bool`` dtype instead
of converting them to ``int8``. Zarr supports ``bool`` natively, so the
Expand All @@ -134,49 +184,49 @@ Bug Fixes
- No longer emit a ``SerializationWarning`` about a missing ``_FillValue`` when
encoding a CF coordinate variable (a 1D variable named after its dimension) to
an integer dtype. CF forbids missing values in coordinate variables, so a
``_FillValue`` is not expected there (:issue:`10305`).
``_FillValue`` is not expected there (:issue:`10305`, :pull:`11524`).
By `NoiceHax <https://github.com/NoiceHax>`_.
- Raise an informative ``TypeError`` when a :py:class:`~xarray.Coordinates` object is
passed as a coordinate value, e.g. ``ds.assign_coords({"x": coords})``, instead
of silently creating a broken coordinate. Pass the object directly with
``ds.assign_coords(coords)`` (:issue:`10194`).
By `NoiceHex <https://github.com/NoiceHax>`_.
``ds.assign_coords(coords)`` (:issue:`10194`, :pull:`11523`).
By `NoiceHax <https://github.com/NoiceHax>`_.
- Fixed two bugs affecting a :py:class:`~xarray.indexes.CoordinateTransformIndex`-backed
coordinate after ``.transpose()``: :py:meth:`~xarray.indexes.CoordinateTransformIndex.create_variables`
(used by, e.g., ``.copy()`` and ``.reindex_like()``-based alignment) discarded the
transposed dims order and silently reverted to the transform's original order; and
``xr.align(..., join="exact")`` raised a spurious ``AlignmentError`` for two objects
sharing an equal multi-dimensional index whose associated coordinate variables
simply had a different dims order (:issue:`11530`).
simply had a different dims order (:issue:`11530`, :pull:`11532`).
By `Samuel Le Meur-Diebolt <https://github.com/sdiebolt>`_.
- :py:meth:`DataArray.to_series` and :py:meth:`Dataset.to_dataframe` no longer
call ``.todense()`` on ``sparse.COO``-backed variables, which could raise
``MemoryError`` for large, genuinely sparse arrays, or (for
``Dataset.to_dataframe``) crash outright since ``sparse.COO`` refuses to
densify implicitly. ``to_series`` now returns only the array's stored
entries; ``to_dataframe`` indexes by the union of stored entries across all
sparse variables sharing the same dims (:issue:`4007`).
sparse variables sharing the same dims (:issue:`4007`, :pull:`11528`).
By `patnr <https://github.com/patnr>`_.
- Following `pandas-dev/pandas#64793`_, ensure that resampling an array to a
``Day`` frequency along a :py:class:`xarray.CFTimeIndex` produces the same
results as resampling to an equivalent ``Hour`` frequency, including with the
use of ``origin`` and ``offset`` options (:pull:`11546`). This effectively
use of ``origin`` and ``offset`` options (:pull:`11547`). This effectively
rolls back the resample-related changes introduced in :pull:`10650`. By
`Spencer Clark <https://github.com/spencerkclark>`_.
- Fix regression where accessing an object-dtype index eagerly attempts to
import cftime, slowing down operations.
import cftime, slowing down operations (:pull:`11558`).
By `Peter Hron <https://github.com/peterhron>`_.
- Fixed :py:meth:`DataArray.coarsen()` and :py:meth:`Dataset.coarsen()` raising a
type error when applying reduction methods, due to the reduction methods being
dynamically generated (:issue:`8136`).
dynamically generated (:issue:`8136`, :pull:`11556`).
By `Andrew Scherer <https://github.com/andrew-s28>`_.
- Fixed a bug that caused rechunking a multi-dimensional cftime array along a
subset of its dimensions to raise an error (:issue:`11567`, :pull:`11576`).
By `Spencer Clark <https://github.com/spencerkclark>`_.
- :py:meth:`Dataset.diff` and :py:meth:`DataArray.diff` now raise a ``ValueError``
when ``dim`` is not an existing dimension, instead of silently returning the
object unchanged. This matches the behavior of other methods such as
:py:meth:`Dataset.differentiate` and reductions like ``mean`` (:issue:`7748`).
:py:meth:`Dataset.differentiate` and reductions like ``mean`` (:issue:`7748`, :pull:`11628`).
By `imam2004i <https://github.com/imam2004i>`_.
- Fixed indexing with an empty indexer array. An empty indexer array is now always
turned into an empty slice for the backend, so that the in-memory part of the
Expand All @@ -201,9 +251,21 @@ Documentation
(:issue:`7517`, :pull:`11618`).
By `Anirban Mandal <https://github.com/CoderAnirban71>`_.

Performance
~~~~~~~~~~~
- Add flox support for :py:meth:`DataArray.groupby().median`,
:py:meth:`Dataset.groupby().median`, :py:meth:`DataArray.resample().median`, and
:py:meth:`Dataset.resample().median`. This significantly speeds up median reductions
when flox is installed by using flox's blockwise implementation, including
rechunking when needed. (:issue:`11238`, :pull:`11239`). By `Samuel Le Meur-Diebolt
<https://github.com/sdiebolt>`_.

Internal Changes
~~~~~~~~~~~~~~~~
- Fix async zarr tests using ``wraps`` with ``autospec=True`` on async methods,
which caused ``AsyncMock`` objects to leak through instead of real array data
(:pull:`11232`).
By `Joe Hamman <https://github.com/jhamman>`_.


.. _whats-new.2026.07.0:
Expand Down Expand Up @@ -255,9 +317,6 @@ Deprecations
Bug Fixes
~~~~~~~~~

- Treat a full ``MultiIndex`` key with tuple-valued levels as scalar selection,
so ``.sel`` no longer preserves a length-1 dimension for nested tuple keys
that identify a single row (:issue:`11341`).
- :py:meth:`Dataset.drop_encoding` and :py:meth:`DataArray.drop_encoding` no
longer copy the underlying data, avoiding excessive memory use on large
datasets (:issue:`11390`, :pull:`11394`).
Expand Down Expand Up @@ -457,13 +516,6 @@ Bug Fixes
By `Emmanuel Ferdman <https://github.com/emmanuel-ferdman>`_.
- :func:`combine_by_coords` no longer returns an empty dataset when a generator is passed as ``data_objects`` (:issue:`10114`, :pull:`11265`).
By `Amartya Anand <https://github.com/SurfyPenguin>`_.
- Warn when tuple-style ``DataArray`` coordinates are renamed by explicitly
provided dimension names (:issue:`11234`, :pull:`11292`).
By `Asish Kumar <https://github.com/officialasishkumar>`_.
- Preserve non-grouped coordinates in fallback ``groupby`` reductions when grouping
by a non-leading dimension reorders the underlying variable dimensions
(:issue:`11188`, :pull:`11290`).
By `Sarthak <https://github.com/Sarthak160>`_.
- Fix h5netcdf backend module detection and ros3 tests (:issue:`11243`, :pull:`11274`).
By `Kai Mühlbauer <https://github.com/kmuehlbauer>`_.

Expand Down Expand Up @@ -494,12 +546,6 @@ Internal Changes
runtime behavior. This enables CI integration for type stub validation and helps
prevent type annotation regressions (:issue:`11086`).
By `Kristian Kollsgård <https://github.com/kkollsga>`_.
- Add flox support for :py:meth:`DataArray.groupby().median`,
:py:meth:`Dataset.groupby().median`, :py:meth:`DataArray.resample().median`, and
:py:meth:`Dataset.resample().median`. This significantly speeds up median reductions
when flox is installed by using flox's blockwise implementation, including
rechunking when needed. (:issue:`11238`, :pull:`11239`). By `Samuel Le Meur-Diebolt
<https://github.com/sdiebolt>`_.

- Remove ``setup.py`` file (:pull:`11261`).
By `Nick Hodgskin <https://github.com/VeckoTheGecko>`_.
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,8 @@ slowy = "slowy"
Commun = "Commun"
Noice = "Noice"
Hax = "Hax"
Yau = "Yau"
whn = "whn"

# Tests
Ome = "Ome"
Expand Down
2 changes: 1 addition & 1 deletion xarray/core/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ class set_options:
netCDF files with ``open_dataset()`` and ``to_netcdf()`` if ``engine``
is not explicitly specified. May be any permutation or subset of
``['netcdf4', 'h5netcdf', 'scipy']``.
use_bottleneck : bool, default: True
use_bottleneck : bool, default: False
Whether to use ``bottleneck`` to accelerate 1D reductions and
1D rolling reduction operations.
use_flox : bool, default: True
Expand Down
Loading