Skip to content

Commit 3b0d8d4

Browse files
authored
Clean-up docs for v0.9.6 (#1446)
1 parent 1504a2b commit 3b0d8d4

File tree

2 files changed

+44
-33
lines changed

2 files changed

+44
-33
lines changed

doc/reshaping.rst

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -209,20 +209,23 @@ To adjust coordinate labels, you can use the :py:meth:`~xarray.Dataset.shift` an
209209
Sort
210210
----
211211

212-
One may sort a dataarray/dataset via :py:meth:`~xarray.DataArray.sortby` and
213-
:py:meth:`~xarray.DataArray.sortby`. The input could either be existing
214-
dimensions, or 1-D dataarrays that share dimensions (and have correct dimension
215-
lengths) as the calling object.
212+
One may sort a DataArray/Dataset via :py:meth:`~xarray.DataArray.sortby` and
213+
:py:meth:`~xarray.DataArray.sortby`. The input can be an individual or list of
214+
1D ``DataArray`` objects:
215+
216+
.. ipython:: python
217+
218+
ds = xr.Dataset({'A': (('x', 'y'), [[1, 2], [3, 4]]),
219+
'B': (('x', 'y'), [[5, 6], [7, 8]])},
220+
coords={'x': ['b', 'a'], 'y': [1, 0]})
221+
dax = xr.DataArray([100, 99], [('x', [0, 1])])
222+
day = xr.DataArray([90, 80], [('y', [0, 1])])
223+
ds.sortby([day, dax])
224+
225+
As a shortcut, you can refer to existing coordinates by name:
216226

217227
.. ipython:: python
218228
219-
ds = Dataset({'A': DataArray([[1, 2], [3, 4]],
220-
[('x', ['b', 'a']),
221-
('y', [1, 0])]),
222-
'B': DataArray([[5, 6], [7, 8]], dims=['x', 'y'])})
223229
ds.sortby('x')
224230
ds.sortby(['y', 'x'])
225231
ds.sortby(['y', 'x'], ascending=False)
226-
dax = DataArray([100, 99], [('x', [0, 1])])
227-
day = DataArray([90, 80], [('y', [0, 1])])
228-
actual = ds.sortby([day, dax])

doc/whats-new.rst

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,55 +15,52 @@ What's New
1515
1616
.. _whats-new.0.9.6:
1717

18-
v0.9.6 (unreleased)
19-
-------------------
18+
v0.9.6 (8 June 2017)
19+
--------------------
2020

21-
- Add ``.dt`` accessor to DataArrays for computing datetime-like properties
22-
for the values they contain, similar to ``pandas.Series`` (:issue:`358`).
23-
By `Daniel Rothenberg <https://github.com/darothen>`_.
21+
This release includes a number of backwards compatible enhancements and bug
22+
fixes.
2423

2524
Enhancements
2625
~~~~~~~~~~~~
26+
2727
- New :py:meth:`~xarray.Dataset.sortby` method to ``Dataset`` and ``DataArray``
2828
that enable sorting along dimensions (:issue:`967`).
29-
(see :ref:`reshape.sort`).
29+
See :ref:`the docs <reshape.sort>` for examples.
3030
By `Chun-Wei Yuan <https://github.com/chunweiyuan>`_ and
31-
`Kyle Heuton <https://github.com/kheuton>`_.
31+
`Kyle Heuton <https://github.com/kheuton>`_.
3232

33-
- Rename the dask arrays created by `open_dataset` to match new dask conventions
34-
(:issue:`1343`). By `Ryan Abernathey <https://github.com/rabernat>`_.
33+
- Add ``.dt`` accessor to DataArrays for computing datetime-like properties
34+
for the values they contain, similar to ``pandas.Series`` (:issue:`358`).
35+
By `Daniel Rothenberg <https://github.com/darothen>`_.
3536

36-
- Enhanced tests suite by use of ``@network`` decorator, which is
37-
controlled via ``--run-network-tests`` command line argument
38-
to ``py.test`` (:issue:`1393`).
39-
By `Matthew Gidden <https://github.com/gidden>`_.
37+
- Renamed internal dask arrays created by ``open_dataset`` to match new dask
38+
conventions (:issue:`1343`).
39+
By `Ryan Abernathey <https://github.com/rabernat>`_.
4040

41-
- ``xarray.core.variable.as_variable`` is now part of the public API and
42-
can be accessed using :py:meth:`~xarray.as_variable` (:issue:`1303`).
41+
- :py:meth:`~xarray.as_variable` is now part of the public API (:issue:`1303`).
4342
By `Benoit Bovy <https://github.com/benbovy>`_.
4443

4544
- :py:func:`~xarray.align` now supports ``join='exact'``, which raises
4645
an error instead of aligning when indexes to be aligned are not equal.
4746
By `Stephan Hoyer <https://github.com/shoyer>`_.
4847

49-
- New backend to open raster files with the
50-
`rasterio <https://mapbox.github.io/rasterio/>`_ library.
48+
- New function :py:func:`~xarray.open_rasterio` for opening raster files with
49+
the `rasterio <https://mapbox.github.io/rasterio/>`_ library.
50+
See :ref:`the docs <io.rasterio>` for details.
5151
By `Joe Hamman <https://github.com/jhamman>`_,
5252
`Nic Wayand <https://github.com/NicWayand>`_ and
5353
`Fabien Maussion <https://github.com/fmaussion>`_
5454

5555
Bug fixes
5656
~~~~~~~~~
5757

58-
- Fix test suite failure caused by changes to ``pandas.cut`` function (:issue:`1386`).
59-
By `Ryan Abernathey <https://github.com/rabernat>`_.
60-
6158
- Fix error from repeated indexing of datasets loaded from disk (:issue:`1374`).
6259
By `Stephan Hoyer <https://github.com/shoyer>`_.
6360

6461
- Fix a bug where ``.isel_points`` wrongly assigns unselected coordinate to
65-
``data_vars``.
66-
By `Keisuke Fujii <https://github.com/fujiisoup>`_.
62+
``data_vars``.
63+
By `Keisuke Fujii <https://github.com/fujiisoup>`_.
6764

6865
- Tutorial datasets are now checked against a reference MD5 sum to confirm
6966
successful download (:issue:`1392`). By `Matthew Gidden
@@ -82,6 +79,17 @@ Documentation
8279
allows to add interactive examples to the documentation.
8380
By `Fabien Maussion <https://github.com/fmaussion>`_.
8481

82+
Testing
83+
~~~~~~~
84+
85+
- Fix test suite failure caused by changes to ``pandas.cut`` function
86+
(:issue:`1386`).
87+
By `Ryan Abernathey <https://github.com/rabernat>`_.
88+
89+
- Enhanced tests suite by use of ``@network`` decorator, which is
90+
controlled via ``--run-network-tests`` command line argument
91+
to ``py.test`` (:issue:`1393`).
92+
By `Matthew Gidden <https://github.com/gidden>`_.
8593

8694
.. _whats-new.0.9.5:
8795

0 commit comments

Comments
 (0)