Wed Dec 13 17:02:28 UTC 2023 - Sebastian Wagner <sebix@sebix.at>
- update to version 2023.12.0:
- This release brings new `hypothesis <https://hypothesis.works/>`_ strategies for testing, significantly faster rolling aggregations as well as:
``ffill`` and ``bfill`` with ``numbagg``, a new :py:meth:`Dataset.eval` method, and improvements to
- reading and writing Zarr arrays (including a new ``"a-"`` mode).:
- Thanks to our 16 contributors:
- Anderson Banihirwe, Ben Mares, Carl Andersson, Deepak Cherian, Doug Latornell, Gregorio L. Trevisan, Illviljan, Jens Hedegaard Nielsen, Justus Magin, Mathias Hauser, Max Jones, Maximilian Roos, Michael Niklas, Patrick Hoefler, Ryan Abernathey, Tom Nicholas:
- New Features:
- Added hypothesis strategies for generating :py:class:`xarray.Variable` objects containing arbitrary data, useful for parametrizing downstream tests.
Accessible under :py:mod:`testing.strategies`, and documented in a new page on testing in the User Guide.
(:issue:`6911`, :pull:`8404`)
By `Tom Nicholas <https://github.com/TomNicholas>`_.
- :py:meth:`rolling` uses `numbagg <https://github.com/numbagg/numbagg>`_ for
most of its computations by default. Numbagg is up to 5x faster than bottleneck
where parallelization is possible. Where parallelization isn't possible — for
example a 1D array — it's about the same speed as bottleneck, and 2-5x faster
than pandas' default functions. (:pull:`8493`). numbagg is an optional
dependency, so requires installing separately.
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Use a concise format when plotting datetime arrays. (:pull:`8449`).
By `Jimmy Westling <https://github.com/illviljan>`_.
- Avoid overwriting unchanged existing coordinate variables when appending with :py:meth:`Dataset.to_zarr` by setting ``mode='a-'``.
By `Ryan Abernathey <https://github.com/rabernat>`_ and `Deepak Cherian <https://github.com/dcherian>`_.
- :py:meth:`~xarray.DataArray.rank` now operates on dask-backed arrays, assuming
the core dim has exactly one chunk. (:pull:`8475`).
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Add a :py:meth:`Dataset.eval` method, similar to the pandas' method of the
same name. (:pull:`7163`). This is currently marked as experimental and
doesn't yet support the ``numexpr`` engine.
- :py:meth:`Dataset.drop_vars` & :py:meth:`DataArray.drop_vars` allow passing a
callable, similar to :py:meth:`Dataset.where` & :py:meth:`Dataset.sortby` & others.
(:pull:`8511`).
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Breaking changes:
- Explicitly warn when creating xarray objects with repeated dimension names.
Such objects will also now raise when :py:meth:`DataArray.get_axis_num` is called,
which means many functions will raise.
This latter change is technically a breaking change, but whilst allowed,
this behaviour was never actually supported! (:issue:`3731`, :pull:`8491`)
By `Tom Nicholas <https://github.com/TomNicholas>`_.
- Deprecations:
- As part of an effort to standardize the API, we're renaming the ``dims``
keyword arg to ``dim`` for the minority of functions which current use
``dims``. This started with :py:func:`xarray.dot` & :py:meth:`DataArray.dot`
and we'll gradually roll this out across all functions. The warnings are
currently ``PendingDeprecationWarning``, which are silenced by default. We'll
convert these to ``DeprecationWarning`` in a future release.
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Raise a ``FutureWarning`` warning that the type of :py:meth:`Dataset.dims` will be changed
from a mapping of dimension names to lengths to a set of dimension names.
This is to increase consistency with :py:meth:`DataArray.dims`.
To access a mapping of dimension names to lengths please use :py:meth:`Dataset.sizes`.
The same change also applies to `DatasetGroupBy.dims`.
(:issue:`8496`, :pull:`8500`)
By `Tom Nicholas <https://github.com/TomNicholas>`_.
- :py:meth:`Dataset.drop` & :py:meth:`DataArray.drop` are now deprecated, since pending deprecation for
several years. :py:meth:`DataArray.drop_sel` & :py:meth:`DataArray.drop_var`
replace them for labels & variables respectively. (:pull:`8497`)
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Bug fixes:
- Fix dtype inference for ``pd.CategoricalIndex`` when categories are backed by a ``pd.ExtensionDtype`` (:pull:`8481`)
- Fix writing a variable that requires transposing when not writing to a region (:pull:`8484`)
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Static typing of ``p0`` and ``bounds`` arguments of :py:func:`xarray.DataArray.curvefit` and :py:func:`xarray.Dataset.curvefit`
was changed to ``Mapping`` (:pull:`8502`).
By `Michael Niklas <https://github.com/headtr1ck>`_.
- Fix typing of :py:func:`xarray.DataArray.to_netcdf` and :py:func:`xarray.Dataset.to_netcdf`
when ``compute`` is evaluated to bool instead of a Literal (:pull:`8268`).
By `Jens Hedegaard Nielsen <https://github.com/jenshnielsen>`_.
- Documentation:
- Added illustration of updating the time coordinate values of a resampled dataset using
time offset arithmetic.
This is the recommended technique to replace the use of the deprecated ``loffset`` parameter
in ``resample`` (:pull:`8479`).
By `Doug Latornell <https://github.com/douglatornell>`_.
- Improved error message when attempting to get a variable which doesn't exist from a Dataset.
(:pull:`8474`)
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Fix default value of ``combine_attrs`` in :py:func:`xarray.combine_by_coords` (:pull:`8471`)
By `Gregorio L. Trevisan <https://github.com/gtrevisan>`_.
- Internal Changes:
- :py:meth:`DataArray.bfill` & :py:meth:`DataArray.ffill` now use numbagg <https://github.com/numbagg/numbagg>`_ by
default, which is up to 5x faster where parallelization is possible. (:pull:`8339`)
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Update mypy version to 1.7 (:issue:`8448`, :pull:`8501`).
By `Michael Niklas <https://github.com/headtr1ck>`_.
- update to version 2023.11.0:
`This is our 10th year anniversary release! <https://github.com/pydata/xarray/discussions/8462>`_ Thank you for your love and support.
- This release brings the ability to use ``opt_einsum`` for :py:func:`xarray.dot` by default,:
- support for auto-detecting ``region`` when writing partial datasets to Zarr, and the use of h5py:
- drivers with ``h5netcdf``.:
- Thanks to the 19 contributors to this release:
- Aman Bagrecha, Anderson Banihirwe, Ben Mares, Deepak Cherian, Dimitri Papadopoulos Orfanos, Ezequiel Cimadevilla Alvarez,:
- Illviljan, Justus Magin, Katelyn FitzGerald, Kai Muehlbauer, Martin Durant, Maximilian Roos, Metamess, Sam Levang, Spencer Clark, Tom Nicholas, mgunyho, templiert:
- New Features:
- Use `opt_einsum <https://optimized-einsum.readthedocs.io/en/stable/>`_ for :py:func:`xarray.dot` by default if installed.
By `Deepak Cherian <https://github.com/dcherian>`_. (:issue:`7764`, :pull:`8373`).
- Add ``DataArray.dt.total_seconds()`` method to match the Pandas API. (:pull:`8435`).
By `Ben Mares <https://github.com/maresb>`_.
- Allow passing ``region="auto"`` in :py:meth:`Dataset.to_zarr` to automatically infer the
region to write in the original store. Also implement automatic transpose when dimension
order does not match the original store. (:issue:`7702`, :issue:`8421`, :pull:`8434`).
By `Sam Levang <https://github.com/slevang>`_.
- Allow the usage of h5py drivers (eg: ros3) via h5netcdf (:pull:`8360`).
By `Ezequiel Cimadevilla <https://github.com/zequihg50>`_.
- Following pandas, :py:meth:`infer_freq` will return ``"Y"``, ``"YS"``,
``"QE"``, ``"ME"``, ``"h"``, ``"min"``, ``"s"``, ``"ms"``, ``"us"``, or
``"ns"`` instead of ``"A"``, ``"AS"``, ``"Q"``, ``"M"``, ``"H"``, ``"T"``,
``"S"``, ``"L"``, ``"U"``, or ``"N"``. This is to be consistent with the
deprecation of the latter frequency strings (:issue:`8394`, :pull:`8415`). By
`Spencer Clark <https://github.com/spencerkclark>`_.
- Bump minimum tested pint version to ``>=0.22``. By `Deepak Cherian <https://github.com/dcherian>`_.
- Minimum supported versions for the following packages have changed: ``h5py >=3.7``, ``h5netcdf>=1.1``.
By `Kai Mühlbauer <https://github.com/kmuehlbauer>`_.
- Deprecations:
- The PseudoNetCDF backend has been removed. By `Deepak Cherian <https://github.com/dcherian>`_.
- Supplying dimension-ordered sequences to :py:meth:`DataArray.chunk` &
:py:meth:`Dataset.chunk` is deprecated in favor of supplying a dictionary of
dimensions, or a single ``int`` or ``"auto"`` argument covering all
dimensions. Xarray favors using dimensions names rather than positions, and
this was one place in the API where dimension positions were used.
(:pull:`8341`)
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Following pandas, the frequency strings ``"A"``, ``"AS"``, ``"Q"``, ``"M"``,
``"H"``, ``"T"``, ``"S"``, ``"L"``, ``"U"``, and ``"N"`` are deprecated in
favor of ``"Y"``, ``"YS"``, ``"QE"``, ``"ME"``, ``"h"``, ``"min"``, ``"s"``,
``"ms"``, ``"us"``, and ``"ns"``, respectively. These strings are used, for
example, in :py:func:`date_range`, :py:func:`cftime_range`,
:py:meth:`DataArray.resample`, and :py:meth:`Dataset.resample` among others
(:issue:`8394`, :pull:`8415`). By `Spencer Clark
<https://github.com/spencerkclark>`_.
- Rename :py:meth:`Dataset.to_array` to :py:meth:`Dataset.to_dataarray` for
consistency with :py:meth:`DataArray.to_dataset` &
:py:func:`open_dataarray` functions. This is a "soft" deprecation — the
existing methods work and don't raise any warnings, given the relatively small
benefits of the change.
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Finally remove ``keep_attrs`` kwarg from :py:meth:`DataArray.resample` and
:py:meth:`Dataset.resample`. These were deprecated a long time ago.
By `Deepak Cherian <https://github.com/dcherian>`_.
- Bug fixes:
- Port `bug fix from pandas <https://github.com/pandas-dev/pandas/pull/55283>`_
to eliminate the adjustment of resample bin edges in the case that the
resampling frequency has units of days and is greater than one day
(e.g. ``"2D"``, ``"3D"`` etc.) and the ``closed`` argument is set to
``"right"`` to xarray's implementation of resample for data indexed by a
:py:class:`CFTimeIndex` (:pull:`8393`).
By `Spencer Clark <https://github.com/spencerkclark>`_.
- Fix to once again support date offset strings as input to the loffset
parameter of resample and test this functionality (:pull:`8422`, :issue:`8399`).
By `Katelyn FitzGerald <https://github.com/kafitzgerald>`_.
- Fix a bug where :py:meth:`DataArray.to_dataset` silently drops a variable
if a coordinate with the same name already exists (:pull:`8433`, :issue:`7823`).
By `András Gunyhó <https://github.com/mgunyho>`_.
- Fix for :py:meth:`DataArray.to_zarr` & :py:meth:`Dataset.to_zarr` to close
the created zarr store when passing a path with `.zip` extension (:pull:`8425`).
By `Carl Andersson <https://github.com/CarlAndersson>_`.
- Documentation:
- Small updates to documentation on distributed writes: See :ref:`io.zarr.appending` to Zarr.
By `Deepak Cherian <https://github.com/dcherian>`_.
- update to version 2023.10.1:
- This release updates our minimum numpy version in ``pyproject.toml`` to 1.22,:
- consistent with our documentation below.:
- update to version 2023.10.0:
- This release brings performance enhancements to reading Zarr datasets, the ability to use `numbagg <https://github.com/numbagg/numbagg>`_ for reductions,:
- an expansion in API for ``rolling_exp``, fixes two regressions with datetime decoding,:
- and many other bugfixes and improvements. Groupby reductions will also use ``numbagg`` if ``flox>=0.8.1`` and ``numbagg`` are both installed.:
- Thanks to our 13 contributors:
- Anderson Banihirwe, Bart Schilperoort, Deepak Cherian, Illviljan, Kai Mühlbauer, Mathias Hauser, Maximilian Roos, Michael Niklas, Pieter Eendebak, Simon Høxbro Hansen, Spencer Clark, Tom White, olimcc:
- New Features:
- Support high-performance reductions with `numbagg <https://github.com/numbagg/numbagg>`_.
This is enabled by default if ``numbagg`` is installed.
By `Deepak Cherian <https://github.com/dcherian>`_. (:pull:`8316`)
- Add ``corr``, ``cov``, ``std`` & ``var`` to ``.rolling_exp``.
By `Maximilian Roos <https://github.com/max-sixty>`_. (:pull:`8307`)
- :py:meth:`DataArray.where` & :py:meth:`Dataset.where` accept a callable for
the ``other`` parameter, passing the object as the only argument. Previously,
this was only valid for the ``cond`` parameter. (:issue:`8255`)
By `Maximilian Roos <https://github.com/max-sixty>`_.
- ``.rolling_exp`` functions can now take a ``min_weight`` parameter, to only
output values when there are sufficient recent non-nan values.
``numbagg>=0.3.1`` is required. (:pull:`8285`)
By `Maximilian Roos <https://github.com/max-sixty>`_.
- :py:meth:`DataArray.sortby` & :py:meth:`Dataset.sortby` accept a callable for
the ``variables`` parameter, passing the object as the only argument.
By `Maximilian Roos <https://github.com/max-sixty>`_.
- ``.rolling_exp`` functions can now operate on dask-backed arrays, assuming the
core dim has exactly one chunk. (:pull:`8284`).
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Breaking changes:
- Made more arguments keyword-only (e.g. ``keep_attrs``, ``skipna``) for many :py:class:`xarray.DataArray` and
:py:class:`xarray.Dataset` methods (:pull:`6403`). By `Mathias Hauser <https://github.com/mathause>`_.
to :py:meth:`Dataset.drop_encoding` & :py:meth:`DataArray.drop_encoding` for
consistency with other ``drop`` & ``reset`` methods — ``drop`` generally
removes something, while ``reset`` generally resets to some default or
standard value. (:pull:`8287`, :issue:`8259`)
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Bug fixes:
- :py:meth:`DataArray.rename` & :py:meth:`Dataset.rename` would emit a warning
when the operation was a no-op. (:issue:`8266`)
By `Simon Hansen <https://github.com/hoxbro>`_.
- Fixed a regression introduced in the previous release checking time-like units
when encoding/decoding masked data (:issue:`8269`, :pull:`8277`).
By `Kai Mühlbauer <https://github.com/kmuehlbauer>`_.
- Fix datetime encoding precision loss regression introduced in the previous
release for datetimes encoded with units requiring floating point values, and
a reference date not equal to the first value of the datetime array
(:issue:`8271`, :pull:`8272`). By `Spencer Clark
<https://github.com/spencerkclark>`_.
- Fix excess metadata requests when using a Zarr store. Prior to this, metadata
was re-read every time data was retrieved from the array, now metadata is retrieved only once
when they array is initialized.
(:issue:`8290`, :pull:`8297`).
By `Oliver McCormack <https://github.com/olimcc>`_.
- Fix to_zarr ending in a ReadOnlyError when consolidated metadata was used and the
write_empty_chunks was provided.
(:issue:`8323`, :pull:`8326`)
By `Matthijs Amesz <https://github.com/Metamess>`_.
- Documentation:
- Added page on the interoperability of xarray objects.
(:pull:`7992`) By `Tom Nicholas <https://github.com/TomNicholas>`_.
- Added xarray-regrid to the list of xarray related projects (:pull:`8272`).
By `Bart Schilperoort <https://github.com/BSchilperoort>`_.
- Internal Changes:
- More improvements to support the Python `array API standard <https://data-apis.org/array-api/latest/>`_
by using duck array ops in more places in the codebase. (:pull:`8267`)
By `Tom White <https://github.com/tomwhite>`_.
- update to version 2023.09.0:
- This release continues work on the new :py:class:`xarray.Coordinates` object, allows to provide `preferred_chunks` when:
- reading from netcdf files, enables :py:func:`xarray.apply_ufunc` to handle missing core dimensions and fixes several bugs.:
- Thanks to the 24 contributors to this release: Alexander Fischer, Amrest Chinkamol, Benoit Bovy, Darsh Ranjan, Deepak Cherian,:
- Gianfranco Costamagna, Gregorio L. Trevisan, Illviljan, Joe Hamman, JR, Justus Magin, Kai Mühlbauer, Kian-Meng Ang, Kyle Sunden,:
- Martin Raspaud, Mathias Hauser, Mattia Almansi, Maximilian Roos, András Gunyhó, Michael Niklas, Richard Kleijn, Riulinchen,:
- Tom Nicholas and Wiktor Kraśnicki.:
- We welcome the following new contributors to Xarray!: Alexander Fischer, Amrest Chinkamol, Darsh Ranjan, Gianfranco Costamagna, Gregorio L. Trevisan,:
- Kian-Meng Ang, Riulinchen and Wiktor Kraśnicki.:
- New Features:
- Added the :py:meth:`Coordinates.assign` method that can be used to combine
different collections of coordinates prior to assign them to a Dataset or
DataArray (:pull:`8102`) at once.
By `Benoît Bovy <https://github.com/benbovy>`_.
- Provide `preferred_chunks` for data read from netcdf files (:issue:`1440`, :pull:`7948`).
By `Martin Raspaud <https://github.com/mraspaud>`_.
- Added `on_missing_core_dims` to :py:meth:`apply_ufunc` to allow for copying or
dropping a :py:class:`Dataset`'s variables with missing core dimensions (:pull:`8138`).
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Breaking changes:
- The :py:class:`Coordinates` constructor now creates a (pandas) index by
default for each dimension coordinate. To keep the previous behavior (no index
created), pass an empty dictionary to ``indexes``. The constructor now also
extracts and add the indexes from another :py:class:`Coordinates` object
passed via ``coords`` (:pull:`8107`).
By `Benoît Bovy <https://github.com/benbovy>`_.
- Static typing of ``xlim`` and ``ylim`` arguments in plotting functions now must
be ``tuple[float, float]`` to align with matplotlib requirements. (:issue:`7802`, :pull:`8030`).
By `Michael Niklas <https://github.com/headtr1ck>`_.
- Deprecations:
- Deprecate passing a :py:class:`pandas.MultiIndex` object directly to the
:py:class:`Dataset` and :py:class:`DataArray` constructors as well as to
:py:meth:`Dataset.assign` and :py:meth:`Dataset.assign_coords`.
A new Xarray :py:class:`Coordinates` object has to be created first using
- Improved static typing of reduction methods (:pull:`6746`).
By `Richard Kleijn <https://github.com/rhkleijn>`_.
- Fix bug where empty attrs would generate inconsistent tokens (:issue:`6970`, :pull:`8101`).
By `Mattia Almansi <https://github.com/malmans2>`_.
- Improved handling of multi-coordinate indexes when updating coordinates, including bug fixes
(and improved warnings for deprecated features) for pandas multi-indexes (:pull:`8094`).
By `Benoît Bovy <https://github.com/benbovy>`_.
- Fixed a bug in :py:func:`merge` with ``compat='minimal'`` where the coordinate
names were not updated properly internally (:issue:`7405`, :issue:`7588`,
:pull:`8104`).
By `Benoît Bovy <https://github.com/benbovy>`_.
- Fix bug where :py:class:`DataArray` instances on the right-hand side
of :py:meth:`DataArray.__setitem__` lose dimension names (:issue:`7030`, :pull:`8067`).
By `Darsh Ranjan <https://github.com/dranjan>`_.
- Return ``float64`` in presence of ``NaT`` in :py:class:`~core.accessor_dt.DatetimeAccessor` and
special case ``NaT`` handling in :py:meth:`~core.accessor_dt.DatetimeAccessor.isocalendar`
(:issue:`7928`, :pull:`8084`).
By `Kai Mühlbauer <https://github.com/kmuehlbauer>`_.
- Fix :py:meth:`~core.rolling.DatasetRolling.construct` with stride on Datasets without indexes.
(:issue:`7021`, :pull:`7578`).
By `Amrest Chinkamol <https://github.com/p4perf4ce>`_ and `Michael Niklas <https://github.com/headtr1ck>`_.
- Calling plot with kwargs ``col``, ``row`` or ``hue`` no longer squeezes dimensions passed via these arguments
(:issue:`7552`, :pull:`8174`).
By `Wiktor Kraśnicki <https://github.com/wkrasnicki>`_.
- Fixed a bug where casting from ``float`` to ``int64`` (undefined for ``NaN``) led to varying issues (:issue:`7817`, :issue:`7942`, :issue:`7790`, :issue:`6191`, :issue:`7096`,
:issue:`1064`, :pull:`7827`).
By `Kai Mühlbauer <https://github.com/kmuehlbauer>`_.
- Fixed a bug where inaccurate ``coordinates`` silently failed to decode variable (:issue:`1809`, :pull:`8195`).
By `Kai Mühlbauer <https://github.com/kmuehlbauer>`_
- ``.rolling_exp`` functions no longer mistakenly lose non-dimensioned coords
(:issue:`6528`, :pull:`8114`).
By `Maximilian Roos <https://github.com/max-sixty>`_.
- In the event that user-provided datetime64/timedelta64 units and integer dtype encoding parameters conflict with each other, override the units to preserve an integer dtype for most faithful serialization to disk (:issue:`1064`, :pull:`8201`).
By `Kai Mühlbauer <https://github.com/kmuehlbauer>`_.
- Static typing of dunder ops methods (like :py:meth:`DataArray.__eq__`) has been fixed.
Remaining issues are upstream problems (:issue:`7780`, :pull:`8204`).
By `Michael Niklas <https://github.com/headtr1ck>`_.
- Fix type annotation for ``center`` argument of plotting methods (like :py:meth:`xarray.plot.dataarray_plot.pcolormesh`) (:pull:`8261`).
By `Pieter Eendebak <https://github.com/eendebakpt>`_.
- Documentation:
- Make documentation of :py:meth:`DataArray.where` clearer (:issue:`7767`, :pull:`7955`).
By `Riulinchen <https://github.com/Riulinchen>`_.
- Internal Changes:
- Many error messages related to invalid dimensions or coordinates now always show the list of valid dims/coords (:pull:`8079`).
By `András Gunyhó <https://github.com/mgunyho>`_.
- Refactor of encoding and decoding times/timedeltas to preserve nanosecond resolution in arrays that contain missing values (:pull:`7827`).
By `Kai Mühlbauer <https://github.com/kmuehlbauer>`_.
- Transition ``.rolling_exp`` functions to use `.apply_ufunc` internally rather
than `.reduce`, as the start of a broader effort to move non-reducing
functions away from ```.reduce``, (:pull:`8114`).
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Test range of fill_value's in test_interpolate_pd_compat (:issue:`8146`, :pull:`8189`).
By `Kai Mühlbauer <https://github.com/kmuehlbauer>`_.
Fri Mar 4 18:00:26 UTC 2022 - Sebastian Wagner <sebix+novell.com@sebix.at>
- - update to version 2022.03.0:
- This release brings a number of small improvements, as well as a move to `calendar versioning <https://calver.org/>`_ (:issue:`6176`).:
- Many thanks to the 16 contributors to the v2022.02.0 release!:
- Aaron Spring, Alan D. Snow, Anderson Banihirwe, crusaderky, Illviljan, Joe Hamman, Jonas Gliß,:
- Lukas Pilz, Martin Bergemann, Mathias Hauser, Maximilian Roos, Romain Caneill, Stan West, Stijn Van Hoey,:
- Tobias Kölling, and Tom Nicholas.:
- New Features:
- Enabled multiplying tick offsets by floats. Allows ``float`` ``n`` in
:py:meth:`CFTimeIndex.shift` if ``shift_freq`` is between ``Day``
and ``Microsecond``. (:issue:`6134`, :pull:`6135`).
By `Aaron Spring <https://github.com/aaronspring>`_.
- Enbable to provide more keyword arguments to `pydap` backend when reading
OpenDAP datasets (:issue:`6274`).
By `Jonas Gliß <https://github.com/jgliss>`.
- Allow :py:meth:`DataArray.drop_duplicates` to drop duplicates along multiple dimensions at once,
and add :py:meth:`Dataset.drop_duplicates`. (:pull:`6307`)
By `Tom Nicholas <https://github.com/TomNicholas>`_.
- Breaking changes:
- Renamed the ``interpolation`` keyword of all ``quantile`` methods (e.g. :py:meth:`DataArray.quantile`)
to ``method`` for consistency with numpy v1.22.0 (:pull:`6108`).
By `Mathias Hauser <https://github.com/mathause>`_.
- Deprecations:
- Bug fixes:
- Variables which are chunked using dask in larger (but aligned) chunks than the target zarr chunk size
can now be stored using `to_zarr()` (:pull:`6258`) By `Tobias Kölling <https://github.com/d70-t>`_.
- Multi-file datasets containing encoded :py:class:`cftime.datetime` objects can be read in parallel again (:issue:`6226`, :pull:`6249`, :pull:`6305`). By `Martin Bergemann <https://github.com/antarcticrainforest>`_ and `Stan West <https://github.com/stanwest>`_.
- Documentation:
- Delete files of datasets saved to disk while building the documentation and enable
building on Windows via `sphinx-build` (:pull:`6237`).
By `Stan West <https://github.com/stanwest>`_.
- Internal Changes:
- update to version 0.21.1:
- This is a bugfix release to resolve (:issue:`6216`, :pull:`6207`).:
- Bug fixes:
- Add `packaging` as a dependency to Xarray (:issue:`6216`, :pull:`6207`).
By `Sebastian Weigand <https://github.com/s-weigand>`_ and `Joe Hamman <https://github.com/jhamman>`_.
- K Aicher, Mark Harfouche, Mathias Hauser, Matthew Roeschke, Maximilian Roos,:
- Michael Delgado, Pascal Bourgault, Pierre, Ray Bell, Romain Caneill, Tim Heap,:
- Tom Nicholas, Zeb Nicholls, joseph nowak, keewis.:
- New Features:
- New top-level function :py:func:`cross`. (:issue:`3279`, :pull:`5365`).
By `Jimmy Westling <https://github.com/illviljan>`_.
- ``keep_attrs`` support for :py:func:`where` (:issue:`4141`, :issue:`4682`, :pull:`4687`).
By `Justus Magin <https://github.com/keewis>`_.
- Enable the limit option for dask array in the following methods :py:meth:`DataArray.ffill`, :py:meth:`DataArray.bfill`, :py:meth:`Dataset.ffill` and :py:meth:`Dataset.bfill` (:issue:`6112`)
By `Joseph Nowak <https://github.com/josephnowak>`_.
- Breaking changes:
- Rely on matplotlib's default datetime converters instead of pandas' (:issue:`6102`, :pull:`6109`).
By `Jimmy Westling <https://github.com/illviljan>`_.
- Improve repr readability when there are a large number of dimensions in datasets or dataarrays by
wrapping the text once the maximum display width has been exceeded. (:issue:`5546`, :pull:`5662`)
By `Jimmy Westling <https://github.com/illviljan>`_.
- Deprecations:
- Removed the lock kwarg from the zarr and pydap backends, completing the deprecation cycle started in :issue:`5256`.
By `Tom Nicholas <https://github.com/TomNicholas>`_.
- Support for ``python 3.7`` has been dropped. (:pull:`5892`)
By `Jimmy Westling <https://github.com/illviljan>`_.
- Bug fixes:
- Preserve chunks when creating a :py:class:`DataArray` from another :py:class:`DataArray`
(:pull:`5984`). By `Fabian Hofmann <https://github.com/FabianHofmann>`_.
- Properly support :py:meth:`DataArray.ffill`, :py:meth:`DataArray.bfill`, :py:meth:`Dataset.ffill` and :py:meth:`Dataset.bfill` along chunked dimensions (:issue:`6112`).
By `Joseph Nowak <https://github.com/josephnowak>`_.
- Subclasses of ``byte`` and ``str`` (e.g. ``np.str_`` and ``np.bytes_``) will now serialise to disk rather than raising a ``ValueError: unsupported dtype for netCDF4 variable: object`` as they did previously (:pull:`5264`).
By `Zeb Nicholls <https://github.com/znicholls>`_.
- Fix applying function with non-xarray arguments using :py:func:`xr.map_blocks`.
By `Cindy Chiao <https://github.com/tcchiao>`_.
- No longer raise an error for an all-nan-but-one argument to
:py:meth:`DataArray.interpolate_na` when using `method='nearest'` (:issue:`5994`, :pull:`6144`).
By `Michael Delgado <https://github.com/delgadom>`_.
- `dt.season <https://xarray.pydata.org/en/stable/generated/xarray.DataArray.dt.season.html>`_ can now handle NaN and NaT. (:pull:`5876`).
By `Pierre Loicq <https://github.com/pierreloicq>`_.
- Determination of zarr chunks handles empty lists for encoding chunks or variable chunks that occurs in certain cirumstances (:pull:`5526`). By `Chris Roat <https://github.com/chrisroat>`_.
- Internal Changes:
- Replace ``distutils.version`` with ``packaging.version`` (:issue:`6092`).
By `Mathias Hauser <https://github.com/mathause>`_.
- Removed internal checks for ``pd.Panel`` (:issue:`6145`).
By `Matthew Roeschke <https://github.com/mroeschke>`_.
- Set the default argument for `roll_coords` to `False` for :py:meth:`DataArray.roll`
and :py:meth:`Dataset.roll`. (:pull:`5653`)
By `Tom Nicholas <https://github.com/TomNicholas>`_.
- :py:meth:`xarray.open_mfdataset` will now error instead of warn when a value for ``concat_dim`` is
passed alongside ``combine='by_coords'``.
By `Tom Nicholas <https://github.com/TomNicholas>`_.
- Bug fixes:
- Fix ZeroDivisionError from saving dask array with empty dimension (:issue: `5741`).
By `Joseph K Aicher <https://github.com/jaicher>`_.
- Fixed performance bug where ``cftime`` import attempted within various core operations if ``cftime`` not
installed (:pull:`5640`).
By `Luke Sewell <https://github.com/lusewell>`_
- Fixed bug when combining named DataArrays using :py:func:`combine_by_coords`. (:pull:`5834`).
By `Tom Nicholas <https://github.com/TomNicholas>`_.
- When a custom engine was used in :py:func:`~xarray.open_dataset` the engine
wasn't initialized properly, causing missing argument errors or inconsistent
method signatures. (:pull:`5684`)
By `Jimmy Westling <https://github.com/illviljan>`_.
- Numbers are properly formatted in a plot's title (:issue:`5788`, :pull:`5789`).
By `Maxime Liquet <https://github.com/maximlt>`_.
- Faceted plots will no longer raise a `pint.UnitStrippedWarning` when a `pint.Quantity` array is plotted,
and will correctly display the units of the data in the colorbar (if there is one) (:pull:`5886`).
By `Tom Nicholas <https://github.com/TomNicholas>`_.
- With backends, check for path-like objects rather than ``pathlib.Path``
type, use ``os.fspath`` (:pull:`5879`).
By `Mike Taves <https://github.com/mwtoews>`_.
- ``open_mfdataset()`` now accepts a single ``pathlib.Path`` object (:issue: `5881`).
By `Panos Mavrogiorgos <https://github.com/pmav99>`_.
- Improved performance of :py:meth:`Dataset.unstack` (:pull:`5906`). By `Tom Augspurger <https://github.com/TomAugspurger>`_.
- Documentation:
- Users are instructed to try ``use_cftime=True`` if a ``TypeError`` occurs when combining datasets and one of the types involved is a subclass of ``cftime.datetime`` (:pull:`5776`).
By `Zeb Nicholls <https://github.com/znicholls>`_.
- A clearer error is now raised if a user attempts to assign a Dataset to a single key of
another Dataset. (:pull:`5839`)
By `Tom Nicholas <https://github.com/TomNicholas>`_.
- Internal Changes:
- Explicit indexes refactor: avoid ``len(index)`` in ``map_blocks`` (:pull:`5670`).
By `Deepak Cherian <https://github.com/dcherian>`_.
- Explicit indexes refactor: decouple ``xarray.Index``` from ``xarray.Variable`` (:pull:`5636`).
By `Benoit Bovy <https://github.com/benbovy>`_.
- Fix ``Mapping`` argument typing to allow mypy to pass on ``str`` keys (:pull:`5690`).
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Annotate many of our tests, and fix some of the resulting typing errors. This will
also mean our typing annotations are tested as part of CI. (:pull:`5728`).
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Improve the performance of reprs for large datasets or dataarrays. (:pull:`5661`)
By `Jimmy Westling <https://github.com/illviljan>`_.
- Use isort's `float_to_top` config. (:pull:`5695`).
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Remove use of the deprecated ``kind`` argument in
``display_expand_data_vars``, all of which can be one of ``True`` to always
expand, ``False`` to always collapse, or ``default`` to expand unless over a
pre-defined limit (:pull:`5126`).
By `Tom White <https://github.com/tomwhite>`_.
- Significant speedups in :py:meth:`Dataset.interp` and :py:meth:`DataArray.interp`.
(:issue:`4739`, :pull:`4740`).
By `Deepak Cherian <https://github.com/dcherian>`_.
- 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).
Also removes unneeded internal reordering of datasets in
:py:func:`xarray.open_mfdataset` when `combine='by_coords'` is specified.
Fixes (:issue:`5230`).
By `Tom Nicholas <https://github.com/TomNicholas>`_.
- Implement ``__setitem__`` for ``xarray.core.indexing.DaskIndexingAdapter`` if
dask version supports item assignment. (:issue:`5171`, :pull:`5174`)
By `Tammas Loughran <https://github.com/tammasloughran>`_.
- Breaking changes:
- The minimum versions of some dependencies were changed:
============ ====== ====
Package Old New
============ ====== ====
boto3 1.12 1.13
cftime 1.0 1.1
dask 2.11 2.15
distributed 2.11 2.15
matplotlib 3.1 3.2
numba 0.48 0.49
============ ====== ====
- :py:func:`open_dataset` and :py:func:`open_dataarray` now accept only the first argument
as positional, all others need to be passed are keyword arguments. This is part of the
refactor to support external backends (:issue:`4309`, :pull:`4989`).
By `Alessandro Amici <https://github.com/alexamici>`_.
- 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 <https://github.com/dschwoerer>`_.
- :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()``.
Further, coarsen now keeps attributes per default (:pull:`5227`).
By `Mathias Hauser <https://github.com/mathause>`_.
- switch the default of the :py:func:`merge` ``combine_attrs`` parameter to
``"override"``. This will keep the current behavior for merging the ``attrs`` of
variables but stop dropping the ``attrs`` of the main objects (:pull:`4902`).
By `Justus Magin <https://github.com/keewis>`_.
- Deprecations:
- Warn when 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).
Also removes unneeded internal reordering of datasets in
:py:func:`xarray.open_mfdataset` when `combine='by_coords'` is specified.
Fixes (:issue:`5230`), via (:pull:`5231`, :pull:`5255`).
By `Tom Nicholas <https://github.com/TomNicholas>`_.
- The `lock` keyword argument to :py:func:`open_dataset` and :py:func:`open_dataarray` is now
a backend specific option. It will give a warning if passed to a backend that doesn't support it
instead of being silently ignored. From the next version it will raise an error.
This is part of the refactor to support external backends (:issue:`5073`).
By `Tom Nicholas <https://github.com/TomNicholas>`_ and `Alessandro Amici <https://github.com/alexamici>`_.
- 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 <https://github.com/dcherian>`_.
- Fix 2d plot failure for certain combinations of dimensions when `x` is 1d and `y` is
2d (:issue:`5097`, :pull:`5099`).
By `John Omotani <https://github.com/johnomotani>`_.
- 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 <https://github.com/znicholls>`_.
- 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 <https://github.com/caenrigen>`_.
- Don't allow passing ``axis`` to :py:meth:`Dataset.reduce` methods (:issue:`3510`, :pull:`4940`).
By `Justus Magin <https://github.com/keewis>`_.
- Decode values as signed if attribute `_Unsigned = "false"` (:issue:`4954`)
By `Tobias Kölling <https://github.com/d70-t>`_.
- Keep coords attributes when interpolating when the indexer is not a Variable. (:issue:`4239`, :issue:`4839` :pull:`5031`)
By `Jimmy Westling <https://github.com/illviljan>`_.
- Ensure standard calendar dates encoded with a calendar attribute with some or
all uppercase letters can be decoded or encoded to or from
``np.datetime64[ns]`` dates with or without ``cftime`` installed
(:issue:`5093`, :pull:`5180`). By `Spencer Clark
<https://github.com/spencerkclark>`_.
- 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 <https://github.com/mathause>`_.
(:issue:`5093`, :pull:`5180`).
By `Spencer Clark <https://github.com/spencerkclark>`_.
- Documentation:
- New section on :ref:`add_a_backend` in the "Internals" chapter aimed to backend developers
(:issue:`4803`, :pull:`4810`).
By `Aureliana Barghini <https://github.com/aurghs>`_.
- 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`).
By `Aaron Spring <https://github.com/aaronspring>`_.
- New sphinx theme & rearrangement of the docs (:pull:`4835`).
By `Anderson Banihirwe <https://github.com/andersy005>`_.
- Internal Changes:
- Enable displaying mypy error codes and ignore only specific error codes using
``# type: ignore[error-code]`` (:pull:`5096`).
By `Mathias Hauser <https://github.com/mathause>`_.
- Replace uses of ``raises_regex`` with the more standard
``pytest.raises(Exception, match="foo")``;
(:pull:`5188`), (:pull:`5191`).
By `Maximilian Roos <https://github.com/max-sixty>`_.
Sun Dec 20 16:09:14 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at>
- update to version 0.16.2:
- This release brings the ability to write to limited regions of ``zarr`` files, open zarr files with :py:func:`open_dataset` and :py:func:`open_mfdataset`, increased support for propagating ``attrs`` using the ``keep_attrs`` flag, as well as numerous bugfixes and documentation improvements.:
- Deprecations:
- :py:attr:`~core.accessor_dt.DatetimeAccessor.weekofyear` and :py:attr:`~core.accessor_dt.DatetimeAccessor.week`
have been deprecated. Use ``DataArray.dt.isocalendar().week``
instead (:pull:`4534`). By `Mathias Hauser <https://github.com/mathause>`_,
`Maximilian Roos <https://github.com/max-sixty>`_, and `Spencer Clark <https://github.com/spencerkclark>`_.
- :py:attr:`DataArray.rolling` and :py:attr:`Dataset.rolling` no longer support passing ``keep_attrs``
via its constructor. Pass ``keep_attrs`` via the applied function, i.e. use
``ds.rolling(...).mean(keep_attrs=False)`` instead of ``ds.rolling(..., keep_attrs=False).mean()``
Rolling operations now keep their attributes per default (:pull:`4510`).
By `Mathias Hauser <https://github.com/mathause>`_.
- New Features:
- :py:func:`open_dataset` and :py:func:`open_mfdataset`
now works with ``engine="zarr"`` (:issue:`3668`, :pull:`4003`, :pull:`4187`).
By `Miguel Jimenez <https://github.com/Mikejmnez>`_ and `Wei Ji Leong <https://github.com/weiji14>`_.
- Unary & binary operations follow the ``keep_attrs`` flag (:issue:`3490`, :issue:`4065`, :issue:`3433`, :issue:`3595`, :pull:`4195`).
By `Deepak Cherian <https://github.com/dcherian>`_.
- Added :py:meth:`~core.accessor_dt.DatetimeAccessor.isocalendar()` that returns a Dataset
with year, week, and weekday calculated according to the ISO 8601 calendar. Requires
pandas version 1.1.0 or greater (:pull:`4534`). By `Mathias Hauser <https://github.com/mathause>`_,
`Maximilian Roos <https://github.com/max-sixty>`_, and `Spencer Clark <https://github.com/spencerkclark>`_.
- :py:meth:`Dataset.to_zarr` now supports a ``region`` keyword for writing to
limited regions of existing Zarr stores (:pull:`4035`).
See :ref:`io.zarr.appending` for full details.
By `Stephan Hoyer <https://github.com/shoyer>`_.
- Added typehints in :py:func:`align` to reflect that the same type received in ``objects`` arg will be returned (:pull:`4522`).
By `Michal Baumgartner <https://github.com/m1so>`_.
- :py:meth:`Dataset.weighted` and :py:meth:`DataArray.weighted` are now executing value checks lazily if weights are provided as dask arrays (:issue:`4541`, :pull:`4559`).
By `Julius Busecke <https://github.com/jbusecke>`_.
- Added the ``keep_attrs`` keyword to ``rolling_exp.mean()``; it now keeps attributes
per default. By `Mathias Hauser <https://github.com/mathause>`_ (:pull:`4592`).
- Added ``freq`` as property to :py:class:`CFTimeIndex` and into the
By `Aaron Spring <https://github.com/aaronspring>`_.
- Bug fixes:
- Fix bug where reference times without padded years (e.g. ``since 1-1-1``) would lose their units when
being passed by :py:func:`encode_cf_datetime` (:issue:`4422`, :pull:`4506`). Such units are ambiguous
about which digit represents the years (is it YMD or DMY?). Now, if such formatting is encountered,
it is assumed that the first digit is the years, they are padded appropriately (to e.g. ``since 0001-1-1``)
and a warning that this assumption is being made is issued. Previously, without ``cftime``, such times
would be silently parsed incorrectly (at least based on the CF conventions) e.g. "since 1-1-1" would
be parsed (via ``pandas`` and ``dateutil``) to ``since 2001-1-1``.
By `Zeb Nicholls <https://github.com/znicholls>`_.
- Fix :py:meth:`DataArray.plot.step`. By `Deepak Cherian <https://github.com/dcherian>`_.
- Fix bug where reading a scalar value from a NetCDF file opened with the ``h5netcdf`` backend would raise a ``ValueError`` when ``decode_cf=True`` (:issue:`4471`, :pull:`4485`).
By `Gerrit Holl <https://github.com/gerritholl>`_.
- Fix bug where datetime64 times are silently changed to incorrect values if they are outside the valid date range for ns precision when provided in some other units (:issue:`4427`, :pull:`4454`).
By `Andrew Pauling <https://github.com/andrewpauling>`_
- Fix silently overwriting the ``engine`` key when passing :py:func:`open_dataset` a file object
to an incompatible netCDF (:issue:`4457`). Now incompatible combinations of files and engines raise
an exception instead. By `Alessandro Amici <https://github.com/alexamici>`_.
- The ``min_count`` argument to :py:meth:`DataArray.sum()` and :py:meth:`DataArray.prod()`
is now ignored when not applicable, i.e. when ``skipna=False`` or when ``skipna=None``
and the dtype does not have a missing value (:issue:`4352`).
By `Mathias Hauser <https://github.com/mathause>`_.
- :py:func:`combine_by_coords` now raises an informative error when passing coordinates
with differing calendars (:issue:`4495`). By `Mathias Hauser <https://github.com/mathause>`_.
- :py:attr:`DataArray.rolling` and :py:attr:`Dataset.rolling` now also keep the attributes and names of of (wrapped)
``DataArray`` objects, previously only the global attributes were retained (:issue:`4497`, :pull:`4510`).
By `Mathias Hauser <https://github.com/mathause>`_.
- Improve performance where reading small slices from huge dimensions was slower than necessary (:pull:`4560`). By `Dion Häfner <https://github.com/dionhaefner>`_.
- Fix bug where ``dask_gufunc_kwargs`` was silently changed in :py:func:`apply_ufunc` (:pull:`4576`). By `Kai Mühlbauer <https://github.com/kmuehlbauer>`_.
- Documentation:
- document the API not supported with duck arrays (:pull:`4530`).
By `Justus Magin <https://github.com/keewis>`_.
- Mention the possibility to pass functions to :py:meth:`Dataset.where` or
:py:meth:`DataArray.where` in the parameter documentation (:issue:`4223`, :pull:`4613`).
By `Justus Magin <https://github.com/keewis>`_.
- Update the docstring of :py:class:`DataArray` and :py:class:`Dataset`.
(:pull:`4532`);
By `Jimmy Westling <https://github.com/illviljan>`_.
- Raise a more informative error when :py:meth:`DataArray.to_dataframe` is
is called on a scalar, (:issue:`4228`);
By `Pieter Gijsbers <https://github.com/pgijsbers>`_.
- Fix grammar and typos in the :doc:`contributing` guide (:pull:`4545`).
By `Sahid Velji <https://github.com/sahidvelji>`_.
- Fix grammar and typos in the :doc:`io` guide (:pull:`4553`).
By `Sahid Velji <https://github.com/sahidvelji>`_.
- Update link to NumPy docstring standard in the :doc:`contributing` guide (:pull:`4558`).
By `Sahid Velji <https://github.com/sahidvelji>`_.
- Add docstrings to ``isnull`` and ``notnull``, and fix the displayed signature
(:issue:`2760`, :pull:`4618`).
By `Justus Magin <https://github.com/keewis>`_.
- Internal Changes:
- Optional dependencies can be installed along with xarray by specifying
extras as ``pip install "xarray[extra]"`` where ``extra`` can be one of ``io``,
``accel``, ``parallel``, ``viz`` and ``complete``. See docs for updated
- Fixed a few bugs with :py:meth:`Dataset.polyfit` when encountering deficient matrix ranks (:issue:`4190`, :pull:`4193`). By `Pascal Bourgault <https://github.com/aulemahal>`_.
- Fixed inconsistencies between docstring and functionality for :py:meth:`DataArray.str.get`
and :py:meth:`DataArray.str.wrap` (:issue:`4334`). By `Mathias Hauser <https://github.com/mathause>`_.
- Fixed overflow issue causing incorrect results in computing means of :py:class:`cftime.datetime`
arrays (:issue:`4341`). By `Spencer Clark <https://github.com/spencerkclark>`_.
- Fixed :py:meth:`Dataset.coarsen`, :py:meth:`DataArray.coarsen` dropping attributes on original object (:issue:`4120`, :pull:`4360`). By `Julia Kent <https://github.com/jukent>`_.
- fix the signature of the plot methods. (:pull:`4359`) By `Justus Magin <https://github.com/keewis>`_.
- Fix :py:func:`xarray.apply_ufunc` with ``vectorize=True`` and ``exclude_dims`` (:issue:`3890`).
By `Mathias Hauser <https://github.com/mathause>`_.
- Fix `KeyError` when doing linear interpolation to an nd `DataArray`
that contains NaNs (:pull:`4233`).
By `Jens Svensmark <https://github.com/jenssss>`_
- Fix incorrect legend labels for :py:meth:`Dataset.plot.scatter` (:issue:`4126`).
By `Peter Hausamann <https://github.com/phausamann>`_.
Sat Feb 1 15:02:10 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at>
- update to version 0.15.0:
- This release brings many improvements to xarray's documentation: our examples are now binderized notebooks (`click here <https://mybinder.org/v2/gh/pydata/xarray/master?urlpath=lab/tree/doc/examples/weather-data.ipynb>`_):
- and we have new example notebooks from our SciPy 2019 sprint (many thanks to our contributors!).:
- This release also features many API improvements such as a new:
:py:class:`~core.accessor_dt.TimedeltaAccessor` and support for :py:class:`CFTimeIndex` in
:py:meth:`~DataArray.interpolate_na`); as well as many bug fixes.
- Breaking changes:
- Bumped minimum tested versions for dependencies:
- numpy 1.15
- pandas 0.25
- dask 2.2
- distributed 2.2
- scipy 1.3
- Remove ``compat`` and ``encoding`` kwargs from ``DataArray``, which
have been deprecated since 0.12. (:pull:`3650`).
Instead, specify the ``encoding`` kwarg when writing to disk or set
the :py:attr:`DataArray.encoding` attribute directly.
By `Maximilian Roos <https://github.com/max-sixty>`_.
- :py:func:`xarray.dot`, :py:meth:`DataArray.dot`, and the ``@`` operator now
use ``align="inner"`` (except when ``xarray.set_options(arithmetic_join="exact")``;
:issue:`3694`) by `Mathias Hauser <https://github.com/mathause>`_.
- New Features:
- :py:meth:`DataArray.sel` and :py:meth:`Dataset.sel` now support :py:class:`pandas.CategoricalIndex`. (:issue:`3669`)
By `Keisuke Fujii <https://github.com/fujiisoup>`_.
- Support using an existing, opened h5netcdf ``File`` with
:py:class:`~xarray.backends.H5NetCDFStore`. This permits creating an
:py:class:`~xarray.Dataset` from a h5netcdf ``File`` that has been opened
using other means (:issue:`3618`).
By `Kai Mühlbauer <https://github.com/kmuehlbauer>`_.
- Implement ``median`` and ``nanmedian`` for dask arrays. This works by rechunking
to a single chunk along all reduction axes. (:issue:`2999`).
By `Deepak Cherian <https://github.com/dcherian>`_.
- :py:func:`~xarray.concat` now preserves attributes from the first Variable.
(:issue:`2575`, :issue:`2060`, :issue:`1614`)
By `Deepak Cherian <https://github.com/dcherian>`_.
- :py:meth:`Dataset.quantile`, :py:meth:`DataArray.quantile` and ``GroupBy.quantile``
now work with dask Variables.
By `Deepak Cherian <https://github.com/dcherian>`_.
- Added the ``count`` reduction method to both :py:class:`~core.rolling.DatasetCoarsen`
and :py:class:`~core.rolling.DataArrayCoarsen` objects. (:pull:`3500`)
By `Deepak Cherian <https://github.com/dcherian>`_
- Add ``meta`` kwarg to :py:func:`~xarray.apply_ufunc`;
this is passed on to :py:func:`dask.array.blockwise`. (:pull:`3660`)
By `Deepak Cherian <https://github.com/dcherian>`_.
- Add ``attrs_file`` option in :py:func:`~xarray.open_mfdataset` to choose the
source file for global attributes in a multi-file dataset (:issue:`2382`,
:pull:`3498`). By `Julien Seguinot <https://github.com/juseg>`_.
- :py:meth:`Dataset.swap_dims` and :py:meth:`DataArray.swap_dims`
now allow swapping to dimension names that don't exist yet. (:pull:`3636`)
Thu Jan 3 17:40:46 UTC 2019 - Sebastian Wagner <sebix+novell.com@sebix.at>
- update to version 0.11.2:
- Removes inadvertently introduced setup dependency on pytest-runner (:issue:`2641`). Otherwise, this release is exactly equivalent to 0.11.1.
- Warning:
- This is the last xarray release that will support Python 2.7. Future releases will be Python 3 only, but older versions of xarray will always be available for Python 2.7 users. For the more details, see:
- update to version 0.11.1:
- Breaking changes
- Minimum rasterio version increased from 0.36 to 1.0 (for open_rasterio)
- Time bounds variables are now also decoded according to CF conventions (:issue:`2565`). The previous behavior was to decode them only if they had specific time attributes, now these attributes are copied automatically from the corresponding time coordinate. This might brake downstream code that was relying on these variables to be not decoded. By Fabien Maussion.
- Enhancements
- Ability to read and write consolidated metadata in zarr stores (:issue:`2558`). By Ryan Abernathey.
- :py:class:`CFTimeIndex` uses slicing for string indexing when possible (like :py:class:`pandas.DatetimeIndex`), which avoids unnecessary copies. By Stephan Hoyer
- Enable passing rasterio.io.DatasetReader or rasterio.vrt.WarpedVRT to open_rasterio instead of file path string. Allows for in-memory reprojection, see (:issue:`2588`). By Scott Henderson.
- Like :py:class:`pandas.DatetimeIndex`, :py:class:`CFTimeIndex` now supports "dayofyear" and "dayofweek" accessors (:issue:`2597`). Note this requires a version of cftime greater than 1.0.2. By Spencer Clark.
- The option 'warn_for_unclosed_files' (False by default) has been added to allow users to enable a warning when files opened by xarray are deallocated but were not explicitly closed. This is mostly useful for debugging; we recommend enabling it in your test suites if you use xarray for IO. By Stephan Hoyer
- Support Dask HighLevelGraphs by Matthew Rocklin.
- :py:meth:`DataArray.resample` and :py:meth:`Dataset.resample` now supports the loffset kwarg just like Pandas. By Deepak Cherian
- Datasets are now guaranteed to have a 'source' encoding, so the source file name is always stored (:issue:`2550`). By Tom Nicholas.
- The apply methods for DatasetGroupBy, DataArrayGroupBy, DatasetResample and DataArrayResample now support passing positional arguments to the applied function as a tuple to the args argument. By Matti Eskelinen.
- 0d slices of ndarrays are now obtained directly through indexing, rather than extracting and wrapping a scalar, avoiding unnecessary copying. By Daniel Wennberg.
- Added support for fill_value with :py:meth:`~xarray.DataArray.shift` and :py:meth:`~xarray.Dataset.shift` By Maximilian Roos
- Bug fixes
- Ensure files are automatically closed, if possible, when no longer referenced by a Python variable (:issue:`2560`). By Stephan Hoyer
- Fixed possible race conditions when reading/writing to disk in parallel (:issue:`2595`). By Stephan Hoyer
- Fix h5netcdf saving scalars with filters or chunks (:issue:`2563`). By Martin Raspaud.
- Fix parsing of _Unsigned attribute set by OPENDAP servers. (:issue:`2583`). By Deepak Cherian
- Fix failure in time encoding when exporting to netCDF with versions of pandas less than 0.21.1 (:issue:`2623`). By Spencer Clark.
- Fix MultiIndex selection to update label and level (:issue:`2619`). By Keisuke Fujii.
Sun Jun 10 20:04:48 UTC 2018 - sebix+novell.com@sebix.at
- update to version 0.10.7:
* Enhancements:
* Plot labels now make use of metadata that follow CF conventions (:issue:`2135`). By Deepak Cherian and Ryan Abernathey.
* Line plots now support facetting with row and col arguments (:issue:`2107`). By Yohai Bar Sinai.
* :py:meth:`~xarray.DataArray.interp` and :py:meth:`~xarray.Dataset.interp` methods are newly added. See :ref:`interpolating values with interp` for the detail. (:issue:`2079`) By Keisuke Fujii.
* Bug fixes:
* Fixed a bug in rasterio backend which prevented use with distributed. The rasterio backend now returns pickleable objects (:issue:`2021`).
- update to version 0.10.6:
* Enhancements:
* New PseudoNetCDF backend for many Atmospheric data formats including GEOS-Chem, CAMx, NOAA arlpacked bit and many others. See :ref:`io.PseudoNetCDF` for more details. By Barron Henderson.
* The :py:class:`Dataset` constructor now aligns :py:class:`DataArray` arguments in data_vars to indexes set explicitly in coords, where previously an error would be raised. (:issue:`674`) By Maximilian Roos.
* :py:meth:`~DataArray.sel`, :py:meth:`~DataArray.isel` & :py:meth:`~DataArray.reindex`, (and their :py:class:`Dataset` counterparts) now support supplying a dict as a first argument, as an alternative to the existing approach of supplying kwargs. This allows for more robust behavior of dimension names which conflict with other keyword names, or are not strings. By Maximilian Roos.
* :py:meth:`~DataArray.rename` now supports supplying **kwargs, as an alternative to the existing approach of supplying a dict as the first argument. By Maximilian Roos.
* :py:meth:`~DataArray.cumsum` and :py:meth:`~DataArray.cumprod` now support aggregation over multiple dimensions at the same time. This is the default behavior when dimensions are not specified (previously this raised an error). By Stephan Hoyer
* :py:meth:`DataArray.dot` and :py:func:`dot` are partly supported with older dask<0.17.4. (related to :issue:`2203`) By Keisuke Fujii.
* Xarray now uses Versioneer to manage its version strings. (:issue:`1300`). By Joe Hamman.
* Bug fixes:
* Fixed a regression in 0.10.4, where explicitly specifying dtype='S1' or dtype=str in encoding with to_netcdf() raised an error (:issue:`2149`). Stephan Hoyer
* :py:func:`apply_ufunc` now directly validates output variables (:issue:`1931`). By Stephan Hoyer.
* Fixed a bug where to_netcdf(..., unlimited_dims='bar') yielded NetCDF files with spurious 0-length dimensions (i.e. b, a, and r) (:issue:`2134`). By Joe Hamman.
* Removed spurious warnings with Dataset.update(Dataset) (:issue:`2161`) and array.equals(array) when array contains NaT (:issue:`2162`). By Stephan Hoyer.
* Aggregations with :py:meth:`Dataset.reduce` (including mean, sum, etc) no longer drop unrelated coordinates (:issue:`1470`). Also fixed a bug where non-scalar data-variables that did not include the aggregation dimension were improperly skipped. By Stephan Hoyer
* Fix :meth:`~DataArray.stack` with non-unique coordinates on pandas 0.23 (:issue:`2160`). By Stephan Hoyer
* Selecting data indexed by a length-1 CFTimeIndex with a slice of strings now behaves as it does when using a length-1 DatetimeIndex (i.e. it no longer falsely returns an empty array when the slice includes the value in the index) (:issue:`2165`). By Spencer Clark.
* Fix DataArray.groupby().reduce() mutating coordinates on the input array when grouping over dimension coordinates with duplicated entries (:issue:`2153`). By Stephan Hoyer
* Fix Dataset.to_netcdf() cannot create group with engine="h5netcdf" (:issue:`2177`). By Stephan Hoyer