@@ -15,84 +15,117 @@ What's New
15
15
16
16
.. _whats-new.0.12.2 :
17
17
18
- v0.12.2 (unreleased )
19
- --------------------
18
+ v0.12.2 (29 June 2019 )
19
+ ----------------------
20
20
21
- Enhancements
22
- ~~~~~~~~~~~~
21
+ New functions/methods
22
+ ~~~~~~~~~~~~~~~~~~~~~
23
+
24
+ - Two new functions, :py:func: `~xarray.combine_nested ` and
25
+ :py:func: `~xarray.combine_by_coords `, allow for combining datasets along any
26
+ number of dimensions, instead of the one-dimensional list of datasets
27
+ supported by :py:func: `~xarray.concat `.
28
+
29
+ The new ``combine_nested `` will accept the datasets as a nested
30
+ list-of-lists, and combine by applying a series of concat and merge
31
+ operations. The new ``combine_by_coords `` instead uses the dimension
32
+ coordinates of datasets to order them.
33
+
34
+ :py:func: `~xarray.open_mfdataset ` can use either ``combine_nested `` or
35
+ ``combine_by_coords `` to combine datasets along multiple dimensions, by
36
+ specifying the argument ``combine='nested' `` or ``combine='by_coords' ``.
37
+
38
+ The older function :py:func: `~xarray.auto_combine ` has been deprecated,
39
+ because its functionality has been subsumed by the new functions.
40
+ To avoid FutureWarnings switch to using ``combine_nested `` or
41
+ ``combine_by_coords ``, (or set the ``combine `` argument in
42
+ ``open_mfdataset ``). (:issue: `2159 `)
43
+ By `Tom Nicholas <http://github.com/TomNicholas >`_.
44
+
45
+ - :py:meth: `~xarray.DataArray.rolling_exp ` and
46
+ :py:meth: `~xarray.Dataset.rolling_exp ` added, similar to pandas'
47
+ ``pd.DataFrame.ewm `` method. Calling ``.mean `` on the resulting object
48
+ will return an exponentially weighted moving average.
49
+ By `Maximilian Roos <https://github.com/max-sixty >`_.
50
+
51
+ - New :py:func: `DataArray.str <core.accessor_str.StringAccessor> ` for string
52
+ related manipulations, based on ``pandas.Series.str ``.
53
+ By `0x0L <https://github.com/0x0L >`_.
54
+
55
+ - Added ``strftime `` method to ``.dt `` accessor, making it simpler to hand a
56
+ datetime ``DataArray `` to other code expecting formatted dates and times.
57
+ (:issue: `2090 `). :py:meth: `~xarray.CFTimeIndex.strftime ` is also now
58
+ available on :py:class: `CFTimeIndex `.
59
+ By `Alan Brammer <https://github.com/abrammer >`_ and
60
+ `Ryan May <https://github.com/dopplershift >`_.
23
61
24
- - New :py:meth: `~xarray.GroupBy.quantile ` method. (:issue: `3018 `)
62
+ - :py:meth: `~xarray.core.GroupBy.quantile ` is now a method of ``GroupBy ``
63
+ objects (:issue: `3018 `).
25
64
By `David Huard <https://github.com/huard >`_.
65
+
66
+ - Argument and return types are added to most methods on ``DataArray `` and
67
+ ``Dataset ``, allowing static type checking both within xarray and external
68
+ libraries. Type checking with `mypy <http://mypy-lang.org/ >`_ is enabled in
69
+ CI (though not required yet).
70
+ By `Guido Imperiale <https://github.com/crusaderky >`_
71
+ and `Maximilian Roos <https://github.com/max-sixty >`_.
72
+
73
+ Enhancements to existing functionality
74
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
75
+
26
76
- Add ``keepdims `` argument for reduce operations (:issue: `2170 `)
27
77
By `Scott Wales <https://github.com/ScottWales >`_.
28
- - netCDF chunksizes are now only dropped when original_shape is different,
29
- not when it isn't found. (:issue: `2207 `)
30
- By `Karel van de Plassche <https://github.com/Karel-van-de-Plassche >`_.
31
- - Enable `@ ` operator for DataArray. This is equivalent to :py:meth: `DataArray.dot `
78
+ - Enable ``@ `` operator for DataArray. This is equivalent to :py:meth: `DataArray.dot `
32
79
By `Maximilian Roos <https://github.com/max-sixty >`_.
33
80
- Add ``fill_value `` argument for reindex, align, and merge operations
34
81
to enable custom fill values. (:issue: `2876 `)
35
82
By `Zach Griffith <https://github.com/zdgriffith >`_.
36
- - :py:meth: `~xarray.DataArray.rolling_exp ` and
37
- :py:meth: `~xarray.Dataset.rolling_exp ` added, similar to pandas'
38
- ``pd.DataFrame.ewm `` method. Calling ``.mean `` on the resulting object
39
- will return an exponentially weighted moving average.
40
- By `Maximilian Roos <https://github.com/max-sixty >`_.
41
- - Character arrays' character dimension name decoding and encoding handled by
42
- ``var.encoding['char_dim_name'] `` (:issue: `2895 `)
43
- By `James McCreight <https://github.com/jmccreight >`_.
44
83
- :py:meth: `DataArray.transpose ` now accepts a keyword argument
45
84
``transpose_coords `` which enables transposition of coordinates in the
46
85
same way as :py:meth: `Dataset.transpose `. :py:meth: `DataArray.groupby `
47
86
:py:meth: `DataArray.groupby_bins `, and :py:meth: `DataArray.resample ` now
48
87
accept a keyword argument ``restore_coord_dims `` which keeps the order
49
88
of the dimensions of multi-dimensional coordinates intact (:issue: `1856 `).
50
89
By `Peter Hausamann <http://github.com/phausamann >`_.
51
- - Clean up Python 2 compatibility in code (:issue: `2950 `)
52
- By `Guido Imperiale <https://github.com/crusaderky >`_.
53
- - Implement ``load_dataset() `` and ``load_dataarray() `` as alternatives to
54
- ``open_dataset() `` and ``open_dataarray() `` to open, load into memory,
55
- and close files, returning the Dataset or DataArray. These functions are
56
- helpful for avoiding file-lock errors when trying to write to files opened
57
- using ``open_dataset() `` or ``open_dataarray() ``. (:issue: `2887 `)
58
- By `Dan Nowacki <https://github.com/dnowacki-usgs >`_.
59
- - Combining datasets along N dimensions:
60
- Datasets can now be combined along any number of dimensions,
61
- instead of just a one-dimensional list of datasets.
62
-
63
- The new ``combine_nested `` will accept the datasets as a nested
64
- list-of-lists, and combine by applying a series of concat and merge
65
- operations. The new ``combine_by_coords `` will instead use the dimension
66
- coordinates of the datasets to order them.
67
-
68
- ``open_mfdataset `` can use either ``combine_nested `` or ``combine_by_coords `` to
69
- combine datasets along multiple dimensions, by specifying the argument
70
- `combine='nested' ` or `combine='by_coords' `.
71
-
72
- This means that the original function ``auto_combine `` is being deprecated.
73
- To avoid FutureWarnings switch to using `combine_nested ` or `combine_by_coords `,
74
- (or set the `combine ` argument in `open_mfdataset `). (:issue: `2159 `)
75
- By `Tom Nicholas <http://github.com/TomNicholas >`_.
76
90
- Better warning message when supplying invalid objects to ``xr.merge ``
77
91
(:issue: `2948 `). By `Mathias Hauser <https://github.com/mathause >`_.
78
- - Added ``strftime `` method to ``.dt `` accessor, making it simpler to hand a
79
- datetime ``DataArray `` to other code expecting formatted dates and times.
80
- (:issue: `2090 `). By `Alan Brammer <https://github.com/abrammer >`_ and
81
- `Ryan May <https://github.com/dopplershift >`_.
82
- - Like :py:class: `pandas.DatetimeIndex `, :py:class: `CFTimeIndex ` now supports a
83
- :py:meth: `~xarray.CFTimeIndex.strftime ` method to return an index of string
84
- formatted datetimes. By `Alan Brammer <https://github.com/abrammer >`_.
85
- - Add ``.str `` accessor to DataArrays for string related manipulations.
86
- By `0x0L <https://github.com/0x0L >`_.
87
92
- Add ``errors `` keyword argument to :py:meth: `Dataset.drop ` and :py:meth: `Dataset.drop_dims `
88
93
that allows ignoring errors if a passed label or dimension is not in the dataset
89
94
(:issue: `2994 `).
90
95
By `Andrew Ross <https://github.com/andrew-c-ross >`_.
91
- - Argument and return types are added to most methods on ``DataArray `` and ``Dataset ``,
92
- allowing static type checking both within xarray and external libraries.
93
- Type checking with ``mypy `` is enabled in CI (though not required yet).
94
- By `Guido Imperiale <https://github.com/crusaderky >`_ and `Maximilian Roos <https://github.com/max-sixty >`_.
95
96
97
+ IO related enhancements
98
+ ~~~~~~~~~~~~~~~~~~~~~~~
99
+
100
+ - Implement :py:func: `~xarray.load_dataset ` and
101
+ :py:func: `~xarray.load_dataarray ` as alternatives to
102
+ :py:func: `~xarray.open_dataset ` and :py:func: `~xarray.open_dataarray ` to
103
+ open, load into memory, and close files, returning the Dataset or DataArray.
104
+ These functions are helpful for avoiding file-lock errors when trying to
105
+ write to files opened using ``open_dataset() `` or ``open_dataarray() ``.
106
+ (:issue: `2887 `)
107
+ By `Dan Nowacki <https://github.com/dnowacki-usgs >`_.
108
+ - It is now possible to extend existing :ref: `io.zarr ` datasets, by using
109
+ ``mode='a' `` and the new ``append_dim `` argument in
110
+ :py:meth: `~xarray.Dataset.to_zarr `.
111
+ By `Jendrik Jördening <https://github.com/jendrikjoe >`_,
112
+ `David Brochart <https://github.com/davidbrochart >`_,
113
+ `Ryan Abernathey <https://github.com/rabernat >`_ and
114
+ `Shikhar Goenka <https://github.com/shikharsg >`_.
115
+ - ``xr.open_zarr `` now accepts manually specified chunks with the ``chunks= ``
116
+ parameter. ``auto_chunk=True `` is equivalent to ``chunks='auto' `` for
117
+ backwards compatibility. The ``overwrite_encoded_chunks `` parameter is
118
+ added to remove the original zarr chunk encoding.
119
+ By `Lily Wang <https://github.com/lilyminium >`_.
120
+ - netCDF chunksizes are now only dropped when original_shape is different,
121
+ not when it isn't found. (:issue: `2207 `)
122
+ By `Karel van de Plassche <https://github.com/Karel-van-de-Plassche >`_.
123
+ - Character arrays' character dimension name decoding and encoding handled by
124
+ ``var.encoding['char_dim_name'] `` (:issue: `2895 `)
125
+ By `James McCreight <https://github.com/jmccreight >`_.
126
+ - open_rasterio() now supports rasterio.vrt.WarpedVRT with custom transform,
127
+ width and height (:issue: `2864 `).
128
+ By `Julien Michel <https://github.com/jmichel-otb >`_.
96
129
97
130
Bug fixes
98
131
~~~~~~~~~
@@ -145,8 +178,6 @@ Bug fixes
145
178
(e.g., ``swap_dims ``, ``isel ``, ``reindex ``, ``[] ``) (:issue: `2842 `,
146
179
:issue: `2856 `).
147
180
By `Stephan Hoyer <https://github.com/shoyer >`_.
148
- - open_rasterio() now supports rasterio.vrt.WarpedVRT with custom transform, width and height (:issue: `2864 `).
149
- By `Julien Michel <https://github.com/jmichel-otb >`_.
150
181
151
182
.. _whats-new.0.12.0 :
152
183
@@ -220,21 +251,11 @@ Other enhancements
220
251
- Upsampling an array via interpolation with resample is now dask-compatible,
221
252
as long as the array is not chunked along the resampling dimension.
222
253
By `Spencer Clark <https://github.com/spencerkclark >`_.
223
-
224
254
- :py:func: `xarray.testing.assert_equal ` and
225
255
:py:func: `xarray.testing.assert_identical ` now provide a more detailed
226
256
report showing what exactly differs between the two objects (dimensions /
227
257
coordinates / variables / attributes) (:issue: `1507 `).
228
258
By `Benoit Bovy <https://github.com/benbovy >`_.
229
- - Added append capability to the zarr store.
230
- By `Jendrik Jördening <https://github.com/jendrikjoe >`_,
231
- `David Brochart <https://github.com/davidbrochart >`_,
232
- `Ryan Abernathey <https://github.com/rabernat >`_ and
233
- `Shikhar Goenka<https://github.com/shikharsg> `_.
234
- - Resampling of standard and non-standard calendars indexed by
235
- :py:class: `~xarray.CFTimeIndex ` is now possible. (:issue: `2191 `).
236
- By `Jwen Fai Low <https://github.com/jwenfai >`_ and
237
- `Spencer Clark <https://github.com/spencerkclark >`_.
238
259
- Add ``tolerance `` option to ``resample() `` methods ``bfill ``, ``pad ``,
239
260
``nearest ``. (:issue: `2695 `)
240
261
By `Hauke Schulz <https://github.com/observingClouds >`_.
@@ -245,11 +266,6 @@ Other enhancements
245
266
By `Keisuke Fujii <https://github.com/fujiisoup >`_.
246
267
- Added :py:meth: `~xarray.Dataset.drop_dims ` (:issue: `1949 `).
247
268
By `Kevin Squire <https://github.com/kmsquire >`_.
248
- - ``xr.open_zarr `` now accepts manually specified chunks with the ``chunks= ``
249
- parameter. ``auto_chunk=True `` is equivalent to ``chunks='auto' `` for
250
- backwards compatibility. The ``overwrite_encoded_chunks `` parameter is
251
- added to remove the original zarr chunk encoding.
252
- By `Lily Wang <https://github.com/lilyminium >`_.
253
269
254
270
Bug fixes
255
271
~~~~~~~~~
0 commit comments