Skip to content

Releases: pydata/xarray

v0.9.0

26 Jan 06:35
Compare
Choose a tag to compare

This major release includes five months worth of enhancements and bug fixes from 24 contributors, including some significant changes that are not fully backwards compatible. Highlights include:

  • Coordinates are now optional in the xarray data model, even for dimensions.
  • Changes to caching, lazy loading and pickling to improve xarray’s experience for parallel computing.
  • Improvements for accessing and manipulating pandas.MultiIndex levels.
  • Many new methods and functions, including quantile(), cumsum(), cumprod() combine_first set_index(), reset_index(), reorder_levels(), full_like(), zeros_like(), ones_like() open_dataarray(), compute(), Dataset.info(), testing.assert_equal(), testing.assert_identical(), and testing.assert_allclose().

For more details, see what's new.

v0.9.0rc1

26 Jan 06:34
Compare
Choose a tag to compare
v0.9.0rc1 Pre-release
Pre-release
v0.9.0rc1

v0.8.2

19 Aug 01:42
Compare
Choose a tag to compare

This release includes a number of bug fixes and minor enhancements.

Breaking changes

  • broadcast() and concat() now auto-align inputs, using join=outer. Previously, these functions raised ValueError for non-aligned inputs. By Guido Imperiale.

Enhancements

  • New documentation on Transitioning from pandas.Panel to xarray. By Maximilian Roos.
  • New Dataset and DataArray methods to_dict() and from_dict() to allow easy conversion between dictionaries and xarray objects (#432). See dictionary IO for more details. By Julia Signell.
  • Added exclude and indexes optional parameters to align(), and exclude optional parameter to broadcast(). - By Guido Imperiale.
  • Better error message when assigning variables without dimensions (#971). By Stephan Hoyer.
  • Better error message when reindex/align fails due to duplicate index values (#956). By Stephan Hoyer.

Bug fixes

  • Ensure xarray works with h5netcdf v0.3.0 for arrays with dtype=str (#953). By Stephan Hoyer.
  • Dataset.dir() (i.e. the method python calls to get autocomplete options) failed if one of the dataset’s keys was not a string (#852). By Maximilian Roos.
  • Dataset constructor can now take arbitrary objects as values (#647). By Maximilian Roos.
    Clarified copy argument for reindex() and align(), which now consistently always return new xarray objects (#927).
  • Fix open_mfdataset with engine='pynio' (#936). By Stephan Hoyer.
    groupby_bins sorted bin labels as strings (#952). By Stephan Hoyer.
  • Fix bug introduced by v0.8.0 that broke assignment to datasets when both the left and right side have the same non-unique index values (#956).

v0.8.1

19 Aug 01:40
Compare
Choose a tag to compare

Bug fixes

  • Fix bug in v0.8.0 that broke assignment to Datasets with non-unique
    indexes (#943). By Stephan Hoyer.

v0.8.0

04 Aug 04:46
Compare
Choose a tag to compare

v0.8.0 (2 August 2016)

This release includes new features and bug fixes, including several breaking changes.

Breaking changes

  • Dropped support for Python 2.6 (#855).
  • Indexing on multi-index now drop levels, which is consistent with pandas. It also changes the name of the dimension / coordinate when the multi-index is reduced to a single index (#802).
  • Contour plots no longer add a colorbar per default (#866). Filled contour plots are unchanged.
  • DataArray.values and .data now always returns an NumPy array-like object, even for 0-dimensional arrays with object dtype (#867). Previously, .values returned native Python objects in such cases. To convert the values of scalar arrays to Python objects, use the .item() method.

Enhancements

  • Groupby operations now support grouping over multidimensional variables. A new method called xarray.Dataset.groupby_bins has also been added to allow users to specify bins for grouping. The new features are described in groupby.multidim and examples.multidim. By Ryan Abernathey.
  • DataArray and Dataset method where now supports a drop=True option that clips coordinate elements that are fully masked. By Phillip J. Wolfram.
  • New top level merge function allows for combining variables from any number of Dataset and/or DataArray variables. See merge for more details. By Stephan Hoyer.
  • DataArray and Dataset method resample now supports the keep_attrs=False option that determines whether variable and dataset attributes are retained in the resampled object. By Jeremy McGibbon.
  • Better multi-index support in DataArray and Dataset sel and loc methods, which now behave more closely to pandas and which also accept dictionaries for indexing based on given level names and labels (see multi-level indexing). By Benoit Bovy.
  • New (experimental) decorators xarray.register_dataset_accessor and xarray.register_dataarray_accessor for registering custom xarray extensions without subclassing. They are described in the new documentation page on internals. By Stephan Hoyer.
  • Round trip boolean datatypes. Previously, writing boolean datatypes to netCDF formats would raise an error since netCDF does not have a bool datatype. This feature reads/writes a dtype attribute to boolean variables in netCDF files. By Joe Hamman.
  • 2D plotting methods now have two new keywords (cbar_ax and cbar_kwargs), allowing more control on the colorbar (#872). By Fabien Maussion.
  • New Dataset method filter_by_attrs, akin to netCDF4.Dataset.get_variables_by_attributes, to easily filter data variables using its attributes. Filipe Fernandes.

Bug fixes

  • Attributes were being retained by default for some resampling operations when they should not. With the keep_attrs=False option, they will no longer be retained by default. This may be backwards-incompatible with some scripts, but the attributes may be kept by adding the keep_attrs=True option. By Jeremy McGibbon.
  • Concatenating xarray objects along an axis with a MultiIndex or PeriodIndex preserves the nature of the index (#875). By Stephan Hoyer.
  • Fixed bug in arithmetic operations on DataArray objects whose dimensions are numpy structured arrays or recarrays #861, #837. By Maciek Swat.
  • decode_cf_timedelta now accepts arrays with ndim >1 (#842). This fixes issue #665. Filipe Fernandes.
  • Fix a bug where xarray.ufuncs that take two arguments would incorrectly use to numpy functions instead of dask.array functions (#876). By Stephan Hoyer.
  • Support for pickling functions from xarray.ufuncs (#901). By Stephan Hoyer.
  • Variable.copy(deep=True) no longer converts MultiIndex into a base Index (#769). By Benoit Bovy.
  • Fixes for groupby on dimensions with a multi-index (#867). By Stephan Hoyer.
  • Fix printing datasets with unicode attributes on Python 2 (#892). By Stephan Hoyer.
  • Fixed incorrect test for dask version (#891). By Stephan Hoyer.
  • Fixed dim argument for isel_points/sel_points when a pandas.Index is passed. By Stephan Hoyer.
  • xarray.plot.contour now plots the correct number of contours (#866). By Fabien Maussion.

v0.8.0rc1

04 Aug 03:43
Compare
Choose a tag to compare
v0.8.0rc1 Pre-release
Pre-release
v0.8.0rc1

v0.7.2

04 Aug 03:43
Compare
Choose a tag to compare
Version 0.7.2

v0.7.1

04 Aug 03:43
Compare
Choose a tag to compare
Version 0.7.1

v0.7.0

04 Aug 03:43
Compare
Choose a tag to compare
Version 0.7.0

v0.6.1

23 Oct 22:29
Compare
Choose a tag to compare

This release contains a number of bug and compatibility fixes, as well as enhancements to plotting, indexing and writing files to disk.

Note that the minimum required version of dask for use with xray is now version 0.6.

  • Faceted plotting through FacetGrid and the plot() method. See Faceting for more details and examples.
  • sel() and reindex() now support the tolerance argument for controlling nearest-neighbor selection (GH629). This feature requires pandas v0.17 or newer.
  • New encoding argument in to_netcdf() for writing netCDF files with compression, as described in the new documentation section on Writing encoded data.
  • Add real and imag attributes to Dataset and DataArray (GH553).
  • More informative error message with from_dataframe() if the frame has duplicate columns.
  • xray now uses deterministic names for dask arrays it creates or opens from disk. This allows xray users to take advantage of dask’s nascent support for caching intermediate computation results. See GH555 for an example.
  • Compatibility with Python 3.5 (GH583).
  • Compatibility with pandas 0.17 (GH569).
  • Compatability with numpy 1.10 (GH618).

See the What's New page for more information. Please report any issues here.

You an install the latest version of xray via conda:

conda install xray

or via pip:

pip install xray