diff --git a/doc/whats-new.rst b/doc/whats-new.rst index 8433f6bda02..b2c2b7f43ec 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -41,19 +41,21 @@ New Features - Add :py:meth:`Dataset.to_pandas` (:pull:`5247`) By `Giacomo Caria `_. - Add :py:meth:`DataArray.plot.surface` which wraps matplotlib's `plot_surface` to make - surface plots (:issue:`#2235` :issue:`#5084` :pull:`5101`). + surface plots (:issue:`2235` :issue:`5084` :pull:`5101`). + By `John Omotani `_. - Allow passing multiple arrays to :py:meth:`Dataset.__setitem__` (:pull:`5216`). By `Giacomo Caria `_. - Add 'cumulative' option to :py:meth:`Dataset.integrate` and :py:meth:`DataArray.integrate` so that result is a cumulative integral, like - :py:meth:`scipy.integrate.cumulative_trapezoidal` (:pull:`5153`). + :py:func:`scipy.integrate.cumulative_trapezoidal` (:pull:`5153`). By `John Omotani `_. - Add ``safe_chunks`` option to :py:meth:`Dataset.to_zarr` which allows overriding checks made to ensure Dask and Zarr chunk compatibility (:issue:`5056`). By `Ryan Abernathey `_ - Add :py:meth:`Dataset.query` and :py:meth:`DataArray.query` which enable indexing of datasets and data arrays by evaluating query expressions against the values of the - data variables (:pull:`4984`). By `Alistair Miles `_. + data variables (:pull:`4984`). + By `Alistair Miles `_. - Allow passing ``combine_attrs`` to :py:meth:`Dataset.merge` (:pull:`4895`). By `Justus Magin `_. - Support for `dask.graph_manipulation @@ -78,6 +80,7 @@ New Features :py:meth:`DataArray.str.rsplit`, and :py:meth:`DataArray.str.split`. A number of these methods allow for splitting or joining the strings in an array. (:issue:`4622`) + By `Todd Jennings `_ - Thanks to the new pluggable backend infrastructure external packages may now use the ``xarray.backends`` entry point to register additional engines to be used in :py:func:`open_dataset`, see the documentation in :ref:`add_a_backend` @@ -97,8 +100,8 @@ New Features way to open example rasterio files (:issue:`3986`, :pull:`4102`, :pull:`5074`). By `Justus Magin `_. - Add typing information to unary and binary arithmetic operators operating on - :py:class:`~core.dataset.Dataset`, :py:class:`~core.dataarray.DataArray`, - :py:class:`~core.variable.Variable`, :py:class:`~core.groupby.DatasetGroupBy` or + :py:class:`Dataset`, :py:class:`DataArray`, :py:class:`Variable`, + :py:class:`~core.groupby.DatasetGroupBy` or :py:class:`~core.groupby.DataArrayGroupBy` (:pull:`4904`). By `Richard Kleijn `_. - Add a ``combine_attrs`` parameter to :py:func:`open_mfdataset` (:pull:`4971`). @@ -107,7 +110,8 @@ New Features :py:meth:`DataArray.clip` & :py:meth:`Dataset.clip`; these methods now use :py:func:`xarray.apply_ufunc`; (:pull:`5184`). By `Maximilian Roos `_. -- Disable the `cfgrib` backend if the `eccodes` library is not installed (:pull:`5083`). By `Baudouin Raoult `_. +- Disable the `cfgrib` backend if the `eccodes` library is not installed (:pull:`5083`). + By `Baudouin Raoult `_. - Added :py:meth:`DataArray.curvefit` and :py:meth:`Dataset.curvefit` for general curve fitting applications. (:issue:`4300`, :pull:`4849`) By `Sam Levang `_. - Add options to control expand/collapse of sections in display of Dataset and @@ -118,7 +122,8 @@ New Features pre-defined limit (:pull:`5126`). By `Tom White `_. - Significant speedups in :py:meth:`Dataset.interp` and :py:meth:`DataArray.interp`. - (:issue:`4739`, :pull:`4740`). By `Deepak Cherian `_. + (:issue:`4739`, :pull:`4740`). + By `Deepak Cherian `_. - Prevent passing `concat_dim` to :py:func:`xarray.open_mfdataset` when `combine='by_coords'` is specified, which should never have been possible (as :py:func:`xarray.combine_by_coords` has no `concat_dim` argument to pass to). @@ -126,7 +131,7 @@ New Features :py:func:`xarray.open_mfdataset` when `combine='by_coords'` is specified. Fixes (:issue:`5230`). By `Tom Nicholas `_. -- Implement ``__setitem__`` for :py:class:`core.indexing.DaskIndexingAdapter` if +- Implement ``__setitem__`` for ``xarray.core.indexing.DaskIndexingAdapter`` if dask version supports item assignment. (:issue:`5171`, :pull:`5174`) By `Tammas Loughran `_. @@ -152,8 +157,8 @@ Breaking changes - Functions that are identities for 0d data return the unchanged data if axis is empty. This ensures that Datasets where some variables do not have the averaged dimensions are not accidentially changed - (:issue:`4885`, :pull:`5207`). By `David Schwörer - `_ + (:issue:`4885`, :pull:`5207`). + By `David Schwörer `_. - :py:attr:`DataArray.coarsen` and :py:attr:`Dataset.coarsen` no longer support passing ``keep_attrs`` via its constructor. Pass ``keep_attrs`` via the applied function, i.e. use ``ds.coarsen(...).mean(keep_attrs=False)`` instead of ``ds.coarsen(..., keep_attrs=False).mean()``. @@ -184,10 +189,15 @@ Deprecations Bug fixes ~~~~~~~~~ - Properly support :py:meth:`DataArray.ffill`, :py:meth:`DataArray.bfill`, :py:meth:`Dataset.ffill`, :py:meth:`Dataset.bfill` along chunked dimensions. - (:issue:`2699`).By `Deepak Cherian `_. + (:issue:`2699`). + By `Deepak Cherian `_. - Fix 2d plot failure for certain combinations of dimensions when `x` is 1d and `y` is - 2d (:issue:`5097`, :pull:`5099`). By `John Omotani `_. -- Ensure standard calendar times encoded with large values (i.e. greater than approximately 292 years), can be decoded correctly without silently overflowing (:pull:`5050`). This was a regression in xarray 0.17.0. By `Zeb Nicholls `_. + 2d (:issue:`5097`, :pull:`5099`). + By `John Omotani `_. +- Ensure standard calendar times encoded with large values (i.e. greater than + approximately 292 years), can be decoded correctly without silently overflowing + (:pull:`5050`). This was a regression in xarray 0.17.0. + By `Zeb Nicholls `_. - Added support for `numpy.bool_` attributes in roundtrips using `h5netcdf` engine with `invalid_netcdf=True` [which casts `bool`s to `numpy.bool_`] (:issue:`4981`, :pull:`4986`). By `Victor Negîrneac `_. - Don't allow passing ``axis`` to :py:meth:`Dataset.reduce` methods (:issue:`3510`, :pull:`4940`). @@ -204,11 +214,14 @@ Bug fixes - Warn on passing ``keep_attrs`` to ``resample`` and ``rolling_exp`` as they are ignored, pass ``keep_attrs`` to the applied function instead (:pull:`5265`). By `Mathias Hauser `_. + (:issue:`5093`, :pull:`5180`). + By `Spencer Clark `_. Documentation ~~~~~~~~~~~~~ - New section on :ref:`add_a_backend` in the "Internals" chapter aimed to backend developers - (:issue:`4803`, :pull:`4810`). By `Aureliana Barghini `_. + (:issue:`4803`, :pull:`4810`). + By `Aureliana Barghini `_. - Add :py:meth:`Dataset.polyfit` and :py:meth:`DataArray.polyfit` under "See also" in the docstrings of :py:meth:`Dataset.polyfit` and :py:meth:`DataArray.polyfit` (:issue:`5016`, :pull:`5020`). @@ -219,7 +232,8 @@ Documentation Internal Changes ~~~~~~~~~~~~~~~~ - Enable displaying mypy error codes and ignore only specific error codes using - ``# type: ignore[error-code]`` (:pull:`5096`). By `Mathias Hauser `_. + ``# type: ignore[error-code]`` (:pull:`5096`). + By `Mathias Hauser `_. - Replace uses of ``raises_regex`` with the more standard ``pytest.raises(Exception, match="foo")``; (:pull:`5188`), (:pull:`5191`). @@ -380,7 +394,8 @@ Bug fixes - Resolve intervals before appending other metadata to labels when plotting (:issue:`4322`, :pull:`4794`). By `Justus Magin `_. - Fix regression when decoding a variable with a ``scale_factor`` and ``add_offset`` given - as a list of length one (:issue:`4631`) by `Mathias Hauser `_. + as a list of length one (:issue:`4631`). + By `Mathias Hauser `_. - Expand user directory paths (e.g. ``~/``) in :py:func:`open_mfdataset` and :py:meth:`Dataset.to_zarr` (:issue:`4783`, :pull:`4795`). By `Julien Seguinot `_. @@ -392,13 +407,15 @@ Bug fixes :pull:`4855`). By `Leif Denby `_. - Fix time encoding bug associated with using cftime versions greater than - 1.4.0 with xarray (:issue:`4870`, :pull:`4871`). By `Spencer Clark `_. + 1.4.0 with xarray (:issue:`4870`, :pull:`4871`). + By `Spencer Clark `_. - Stop :py:meth:`DataArray.sum` and :py:meth:`DataArray.prod` computing lazy arrays when called with a ``min_count`` parameter (:issue:`4898`, :pull:`4911`). By `Blair Bonnett `_. - Fix bug preventing the ``min_count`` parameter to :py:meth:`DataArray.sum` and :py:meth:`DataArray.prod` working correctly when calculating over all axes of - a float64 array (:issue:`4898`, :pull:`4911`). By `Blair Bonnett `_. + a float64 array (:issue:`4898`, :pull:`4911`). + By `Blair Bonnett `_. - Fix decoding of vlen strings using h5py versions greater than 3.0.0 with h5netcdf backend (:issue:`4570`, :pull:`4893`). By `Kai Mühlbauer `_. - Allow converting :py:class:`Dataset` or :py:class:`DataArray` objects with a ``MultiIndex``