Releases: pydata/xarray
v2023.11.0
Note
This is our 10th year anniversary release! 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
What's Changed
- [skip-ci] dev whats-new by @dcherian in #8349
- [skip-ci] Add benchmarks for Dataset binary ops, chunk by @dcherian in #8351
- Add better ASV test cases for open_dataset by @Illviljan in #8352
- Reduce dask tokenization time by @martindurant in #8339
- Deprecate tuples of chunks? by @max-sixty in #8341
- Remove unnecessary for loop when using get_axis_num by @Illviljan in #8356
- Use namedarray repr in _array_api docstrings by @Illviljan in #8355
- NamedArray.ndim can only be int by @Illviljan in #8362
- docs: add searchable word "asterisk" by @templiert in #8363
- add
.imag
and.real
properties toNamedArray
by @andersy005 in #8365 - fix
NamedArray.imag
andNamedArray.real
typing info by @andersy005 in #8369 - Add chunkedduckarray to _typing by @Illviljan in #8376
- Do not intercept left/right keys in HTML docs by @DimitriPapadopoulos in #8379
- Docs page on interoperability by @TomNicholas in #7992
- Fix typos found by codespell by @DimitriPapadopoulos in #8375
- Use
opt_einsum
by default if installed. by @dcherian in #8373 - Allow Variable type as dim argument to concat by @maresb in #8384
- Remove duplicated navigation_with_keys in docs config by @Illviljan in #8390
- Add duckarray test for np.array_api by @Illviljan in #8391
- Fix sparse typing by @Illviljan in #8387
- Correct typing for _sparsearray by @Illviljan in #8395
- Port fix from pandas-dev/pandas#55283 to cftime resample by @spencerkclark in #8393
- Fix for Dataset.to_zarr with both
consolidated
andwrite_empty_chunks
by @Metamess in #8326 - Test masked array by @Illviljan in #8396
- Better attr diff for
testing.assert_identical
by @dcherian in #8400 - Add cross-links to API docstring from tutorial and user-guide by @amanbagrecha in #8311
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #8418
- Fix for date offset strings with resample loffset by @kafitzgerald in #8422
- Declare Dataset, DataArray, Variable, GroupBy unhashable by @maresb in #8392
- Add missing DataArray.dt.total_seconds() method by @maresb in #8435
- Rename
to_array
toto_dataarray
by @max-sixty in #8438 - Remove keep_attrs from resample signature by @dcherian in #8444
- Pin pint to >=0.22 by @dcherian in #8445
- Remove PseudoNetCDF by @dcherian in #8446
- remove
cdms2
by @keewis in #8441 - Automatic region detection and transpose for
to_zarr()
by @slevang in #8434 - Raise exception in to_dataset if resulting variable is also the name of a coordinate by @mgunyho in #8433
- Added driver parameter for h5netcdf by @zequihg50 in #8360
- Deprecate certain cftime frequency strings following pandas by @spencerkclark in #8415
- [skip-ci] Small updates to IO docs. by @dcherian in #8452
- Fix typos found by codespell by @DimitriPapadopoulos in #8457
- Pin mypy < 1.7 by @dcherian in #8458
- preserve vlen string dtypes, allow vlen string fill_values by @kmuehlbauer in #7869
- migrate the other CI to python 3.11 by @keewis in #8416
- 2023.11.0 Whats-new by @dcherian in #8461
New Contributors
- @maresb made their first contribution in #8384
- @Metamess made their first contribution in #8326
- @amanbagrecha made their first contribution in #8311
- @kafitzgerald made their first contribution in #8422
- @zequihg50 made their first contribution in #8360
Full Changelog: v2023.10.1...v2023.11.0
v2023.10.1
This release updates our minimum numpy version in pyproject.toml
to 1.22, consistent with our documentation.
Please see the v2023.10.0 release notes for our recent changes.
v2023.10.0
Highlights
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
What's Changed
- [skip-ci] dev whats-new by @kmuehlbauer in #8232
- initial refactor for NamedArray by @andersy005 in #8075
- Bind T_DuckArray to NamedArray by @Illviljan in #8240
- Fix & normalize typing for chunks by @max-sixty in #8247
- Add type hints to maybe_promote in dtypes.py by @Illviljan in #8243
- Refine
chunks=None
handling by @max-sixty in #8249 - Add modules to
check-untyped
by @max-sixty in #8242 - update pytest config and un-xfail some tests by @mathause in #8246
- Accept
lambda
forother
param by @max-sixty in #8256 - [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #8262
- Update type annotation for center argument of dataaray_plot methods by @eendebakpt in #8261
- Use strict type hinting for namedarray by @Illviljan in #8241
- Add xarray-regrid to ecosystem.rst by @BSchilperoort in #8270
- copy the
dtypes
module to thenamedarray
package. by @andersy005 in #8250 - Mandate kwargs on
to_zarr
by @max-sixty in #8257 - Don't raise rename warning if it is a no operation by @hoxbro in #8266
- Use duck array ops in more places by @tomwhite in #8267
- make more args kw only (except 'dim') by @mathause in #6403
- Allow a function in
.sortby
method by @max-sixty in #8273 - Fix datetime encoding precision loss regression for units requiring floating point values by @spencerkclark in #8272
- Remove if condition to trigger mypy by @Illviljan in #8280
- Improved typing of align & broadcast by @headtr1ck in #8234
- Add pyright type checker by @Illviljan in #8279
- Ask bug reporters to confirm they're using a recent version of xarray by @max-sixty in #8283
- Fix
GroupBy
import by @max-sixty in #8286 - Enable
.rolling_exp
to work on dask arrays by @max-sixty in #8284 - Rename
reset_encoding
todrop_encoding
by @max-sixty in #8287 - mypy 1.6.0 passing by @max-sixty in #8296
- xfail flaky test by @max-sixty in #8299
- Remove real, imag, astype methods from NamedArray by @Illviljan in #8295
- Avoid redundant metadata reads in
ZarrArrayWrapper
by @olimcc in #8297 - Update labeler.yml to add NamedArray by @dcherian in #8305
- Add
min_weight
param torolling_exp
functions by @max-sixty in #8285 - Handle numpy missing the array api function astype by @Illviljan in #8315
- Reverse type checks for better type inheritance by @Illviljan in #8313
- Fix typing issues in tests by @Illviljan in #8312
- Remove a couple of trailing commas in tests by @max-sixty in #8321
- Remove redundant check in IndexVariable by @Illviljan in #8320
- Move Variable aggregations to NamedArray by @dcherian in #8304
- Refine curvefit doctest by @max-sixty in #8328
- Use shape and dtype as typevars in NamedArray by @Illviljan in #8294
- Enable numbagg for reductions by @dcherian in #8316
- Remove np.asarray in formatting.py by @dcherian in #8100
- fix regression in time-like check when decoding masked data by @kmuehlbauer in #8277
- Add docs to
reindex_like
re broadcasting by @max-sixty in #8327 - Add
corr
,cov
,std
&var
to.rolling_exp
by @max-sixty in #8307 - Request to adjust pyright config by @max-sixty in #8329
- Docs: Add syntax for registering backends in
pyproject.toml
by @ZedThree in #8331 - internal: Improve version handling for numbagg by @max-sixty in #8325
- Whats-new: 2023.10.0 by @dcherian in #8334
New Contributors
- @eendebakpt made their first contribution in #8261
- @BSchilperoort made their first contribution in #8270
- @hoxbro made their first contribution in #8266
- @olimcc made their first contribution in #8297
Full Changelog: v2023.09.0...v2023.10.0
v2023.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.
What's Changed
- [skip-ci] dev whats-new by @dcherian in #8098
- Refactor update coordinates to better handle multi-coordinate indexes by @benbovy in #8094
- Better error message when trying to set an index from a scalar coordinate by @benbovy in #8109
- Fix merge with compat=minimal (coord names) by @benbovy in #8104
- Fix Codecov by @headtr1ck in #7142
- Better default behavior of the Coordinates constructor by @benbovy in #8107
- Document drop_variables in open_mfdataset by @jerabaul29 in #8083
- adapted the docstring of xarray.DataArray.differentiate by @afisc in #8127
- Add
Coordinates.assign()
method by @benbovy in #8102 - Fix pandas'
interpolate(fill_value=)
error by @max-sixty in #8139 - Fix doctests: pandas 2.1 MultiIndex repr with nan by @benbovy in #8141
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #8145
- Cut middle version from CI by @max-sixty in #8156
- Dirty workaround for mypy 1.5 error by @benbovy in #8142
- tests: Update US/Eastern timezone to America/New_York by @LocutusOfBorg in #8153
- Docs page on internal design by @TomNicholas in #7991
- Fix tokenize with empty attrs by @malmans2 in #8101
- Consistently report all dimensions in error messages if invalid dimensions are given by @mgunyho in #8079
- Fix typos by @kianmeng in #8163
- to_stacked_array: better error msg & refactor by @mathause in #8130
- fix miscellaneous
numpy=2.0
errors by @keewis in #8117 - Bump actions/checkout from 3 to 4 by @dependabot in #8169
- Don't try to sort hashable, map to string by @Illviljan in #8172
- Implement preferred_chunks for netcdf 4 backends by @mraspaud in #7948
- Fix assignment with .loc by @dranjan in #8067
- improve typing of DataArray and Dataset reductions by @rhkleijn in #6746
- FIX: handle NaT values in dt-accessor by @kmuehlbauer in #8084
- Fix
PeriodIndex
deprecation in xarray tests by @max-sixty in #8182 - Display data returned in
apply_ufunc
error message by @max-sixty in #8179 - Set dev version above released version by @max-sixty in #8181
- Remove
setup.cfg
in favor ofpyproject.toml
by @max-sixty in #8183 - Fix comment alignment in
pyproject.toml
by @max-sixty in #8185 - fix the failing docs by @keewis in #8188
- Fix pytest markers by @max-sixty in #8191
- Fix several warnings in the tests by @headtr1ck in #8184
- FIX: use "krogh" as interpolator method-string instead of "krog" by @kmuehlbauer in #8187
- Update contourf call check for mpl 3.8 by @ksunden in #8186
- Fix static typing with Matplotlib 3.8 by @headtr1ck in #8030
- Exclude dimensions used in faceting from squeeze by @wkrasnicki in #8174
- Remove
requirements.txt
by @max-sixty in #8196 - Preserve nanosecond resolution when encoding/decoding times by @kmuehlbauer in #7827
- Allow
apply_ufunc
to ignore missing core dims by @max-sixty in #8138 - Adjust ufunc error message by @max-sixty in #8192
- Add some more mypy checks by @max-sixty in #8193
- Fix sortby link in reshaping.rst by @gtrevisan in #8202
- remove invalid statement from doc/user-guide/io.rst by @kmuehlbauer in #8194
- Move
.rolling_exp
functions fromreduce
toapply_ufunc
by @max-sixty in #8114 - Add T_DuckArray type hint to Variable.data by @Illviljan in #8203
- Attempt to reproduce #7079 in CI by @jhamman in #7488
- Add comments on when to use which
TypeVar
by @max-sixty in #8212 - Start a list of modules which require typing by @max-sixty in #8198
- Make documentation of DataArray.where clearer by @Riulinchen in #7955
- Removed
.isel
forDatasetRolling.construct
consistent rolling behavior by @p4perf4ce in #7578 - Skip flaky test by @max-sixty in #8219
- Convert
indexes.py
to useSelf
for typing by @max-sixty in #8217 - Use
Self
rather than concrete types, removecast
s by @max-sixty in #8216 - Allow creating DataArrays with nD coordinate variables by @dcherian in #8126
- Remove an import fallback by @max-sixty in #8228
- Add a
Literal
typing by @max-sixty in #8227 - Add typing to functions related to data_vars by @Illviljan in #8226
- override
units
for datetime64/timedelta64 variables to preserve integer dtype by @kmuehlbauer in #8201 - test_interpolate_pd_compat with range of fill_value's by @kmuehlbauer in #8189
- Rewrite typed_ops by @headtr1ck in #8204
- adapt to NEP 51 by @keewis in #8064
- decode variable with mismatched coordinate attribute by @kmuehlbauer in #8195
- Release 2023.09.0 by @kmuehlbauer in #8229
New Contributors
- @jerabaul29 made their first contribution in #8083
- @afisc made their first contribution in #8127
- @LocutusOfBorg made their first contribution in #8153
- @kianmeng made their first contribution in #8163
- @dranjan made their first contribution in #8067
- @wkrasnicki made their first contribution in #8174
- @gtrevisan made their first contribution in #8202
- @Riulinchen made their first contribution in #7955
- @p4perf4ce made their first contribution in #7578
Full Changelog: v2023.08.0...v2023.09.0
v2023.08.0
This release brings changes to minimum dependencies, allows reading of datasets where a dimension name is
associated with a multidimensional variable (e.g. finite volume ocean model output), and introduces
a new :py:class:xarray.Coordinates
object.
Thanks to the 16 contributors to this release: Anderson Banihirwe, Articoking, Benoit Bovy, Deepak Cherian, Harshitha, Ian Carroll,
Joe Hamman, Justus Magin, Peter Hill, Rachel Wegener, Riley Kuttruff, Thomas Nicholas, Tom Nicholas, ilgast, quantsnus, vallirep
Announcements
The xarray.Variable
class is being refactored out to a new project title 'namedarray'.
See the design doc for more
details. Reach out to us on this discussion topic if you have any thoughts.
What's Changed
- Use variable name in all exceptions raised in
as_variable
by @ZedThree in #7995 - Add documentation on custom indexes by @benbovy in #6975
- Allow opening datasets with nD dimenson coordinate variables. by @dcherian in #7989
- Update copyright year in README by @dcherian in #8007
- join together duplicate entries in the text
repr
by @keewis in #7225 - Core team member guide by @TomNicholas in #7999
- Expose "Coordinates" as part of Xarray's public API by @benbovy in #7368
- improved docstring of to_netcdf (issue #7127) by @vallirep in #7947
- Update interpolate_na in dataset.py by @ilgast in #7974
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #8014
- Add HDF5 Section to read/write docs page by @rwegener2 in #8012
- Add examples to docstrings by @harshitha1201 in #7937
- (chore) min versions bump by @jhamman in #8022
- Automatically chunk
other
in GroupBy binary ops. by @dcherian in #7684 - change cumproduct to cumprod by @quantsnus in #8031
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #8032
- Reduce pre-commit update frequency to monthly from weekly. by @dcherian in #8033
- sort when encoding coordinates for deterministic outputs by @itcarroll in #8034
- Zarr : Allow setting
write_empty_chunks
by @RKuttruff in #8016 - [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #8052
- Count documentation by @Articoking in #8057
- Bump pypa/gh-action-pypi-publish from 1.8.8 to 1.8.10 by @dependabot in #8068
- add design document for "named-array" by @andersy005 in #8073
- unpin
numpy
by @keewis in #8061 - Extending the glossary by @harshitha1201 in #7732
- Add 2023.08.0 whats-new by @dcherian in #8081
New Contributors
- @ZedThree made their first contribution in #7995
- @vallirep made their first contribution in #7947
- @ilgast made their first contribution in #7974
- @rwegener2 made their first contribution in #8012
- @quantsnus made their first contribution in #8031
- @RKuttruff made their first contribution in #8016
- @Articoking made their first contribution in #8057
Full Changelog: v2023.07.0...v2023.08.0
v2023.07.0
This release brings improvements to the documentation on wrapping numpy-like arrays, improved docstrings, and bug fixes.
Thanks to our 7 contributors:
Harshitha, Illviljan, Johan Mathe, Justus Magin, Kai Mühlbauer, Tom Nicholas, and Yvonne Fröhlich.
What's Changed
- Allow cubed arrays to be passed to flox groupby by @TomNicholas in #7941
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #7944
- Duck array documentation improvements by @TomNicholas in #7911
- Bump pypa/gh-action-pypi-publish from 1.8.6 to 1.8.7 by @dependabot in #7956
- Docstring examples by @harshitha1201 in #7881
- Update minimum version of typing extensions in pre-commit by @TomNicholas in #7960
- manually unshallow the repository on RTD by @keewis in #7961
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #7959
- Chunked array docs by @TomNicholas in #7951
- ensure no forward slashes in names for HDF5-based backends by @kmuehlbauer in #7953
- Move absolute path finder from open_mfdataset to own function by @Illviljan in #7968
- Use another repository for upstream testing by @Illviljan in #7970
- Skip broken tests on Python 3.11 and Windows by @Illviljan in #7972
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #7973
- Examples added to docstrings by @harshitha1201 in #7936
- Fix typo in zarr.py by @johmathe in #7983
- Improve explanation in example "Working with Multidimensional Coordinates" by @yvonnefroehlich in #7984
- Release summary for v2023.07.0 by @TomNicholas in #7979
- Add new what's new section by @Illviljan in #7986
- Remove hue_style from plot1d docstring by @Illviljan in #7925
- Update whats-new.rst for new release by @TomNicholas in #7993
New Contributors
- @johmathe made their first contribution in #7983
- @yvonnefroehlich made their first contribution in #7984
Full Changelog: v2023.06.0...v2023.07.0
v2023.06.0
This release adds features to curvefit
, improves the performance of concatenation, and fixes various bugs.
Thank to our 13 contributors to this release:
Anderson Banihirwe, Deepak Cherian, Illviljan, Juniper Tyree, Justus Magin, Martin Fleischmann,
Mattia Almansi, mgunyho, Negin Sobhani, Rutger van Haasteren, Tom Nicholas, Tom White.
What's Changed
- Array API fixes for astype by @TomNicholas in #7847
- Add type hints to test_dtypes by @Illviljan in #7858
- Bump codecov/codecov-action from 3.1.3 to 3.1.4 by @dependabot in #7859
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #7864
- Upload nightly wheels to scientific-python-nightly-wheels by @martinfleis in #7865
- adapt the
pint
+dask
test to the newest version ofpint
by @keewis in #7855 - Avoid explicit loop when updating OrderedSet by @Illviljan in #7857
- Improve to_dask_dataframe performance by @Illviljan in #7844
- Changed duck typing exception to: (ImportError, AttributeError) by @vhaasteren in #7874
- defer to
numpy
for the expected result by @keewis in #7875 - add
numba
to the py3.11 environment by @keewis in #7867 - deprecate the
cdms2
conversion methods by @keewis in #7876 - [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #7882
- Implement multidimensional initial guess and bounds for
curvefit
by @mgunyho in #7821 - move to
setup-micromamba
by @keewis in #7878 - Improve concat performance by @Illviljan in #7824
- retire the TestPyPI workflow by @keewis in #7889
- Fix .groupby(multi index level) by @dcherian in #7830
- don't use
CacheFileManager.__del__
on interpreter shutdown by @keewis in #7880 - fix polyfit changing the original object by @malmans2 in #7900
- Fix flaky doctest for curvefit by @mgunyho in #7893
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #7912
- Ensure dtype of reindex result matches dtype of the original DataArray by @andersy005 in #7917
- Add errors option to curvefit by @mgunyho in #7891
- CF encoding should preserve vlen dtype for empty arrays by @tomwhite in #7862
- use trusted publishers instead of a API token by @keewis in #7899
- Add cfgrib,ipywidgets to doc env by @dcherian in #7888
- Update calendar for developers meeting by @shoyer in #7933
- Fix regression with grouper object on an IndexVariable by @mwtoews in #7920
- Release summary for v2023.06.0 by @TomNicholas in #7934
- Fix check for chunk_store in zarr backend by @juntyr in #7923
- fixing rolling_window issue with cupy by @negin513 in #7938
New Contributors
- @martinfleis made their first contribution in #7865
- @vhaasteren made their first contribution in #7874
- @juntyr made their first contribution in #7923
- @negin513 made their first contribution in #7938
Full Changelog: v2023.05.0...v2023.06.0
v2023.05.0
This release adds some new methods and operators, updates our deprecation policy for python versions, fixes some bugs with groupby,
and introduces experimental support for alternative chunked parallel array computation backends via a new plugin system!
Note: If you are using a locally-installed development version of xarray then pulling the changes from this release may require you to re-install.
This avoids an error where xarray cannot detect dask via the new entrypoints system introduced in pull rquest #7019. See issue #7856 for details.
Thanks to our 14 contributors:
Alan Brammer, crusaderky, David Stansby, dcherian, Deeksha, Deepak Cherian, Illviljan, James McCreight,
Joe Hamman, Justus Magin, Kyle Sunden, Max Hollmann, mgunyho, and Tom Nicholas!
v2023.04.2
This is a bugfix release to fix another bug with binning (#7766)
What's Changed
- Docstrings examples for string methods by @remigathoni in #7669
- Fix groupby_bins when labels are specified by @dcherian in #7769
Full Changelog: v2023.04.1...v2023.04.2
v2023.04.1
This is a patch release to fix a bug with groupby_bins
What's Changed
Full Changelog: v2023.04.0...v2023.04.1