Skip to content

Commit 954b8d0

Browse files
authored
Doc updates for 0.10.4 release (#2138)
* Doc updates for 0.10.4 release * Fix to_netcdf() with engine=h5netcdf entry in whatsnew
1 parent 4972dfd commit 954b8d0

File tree

3 files changed

+63
-30
lines changed

3 files changed

+63
-30
lines changed

doc/api.rst

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,19 @@ DataArray methods
496496
DataArray.load
497497
DataArray.chunk
498498

499+
GroupBy objects
500+
===============
501+
502+
.. autosummary::
503+
:toctree: generated/
504+
505+
core.groupby.DataArrayGroupBy
506+
core.groupby.DataArrayGroupBy.apply
507+
core.groupby.DataArrayGroupBy.reduce
508+
core.groupby.DatasetGroupBy
509+
core.groupby.DatasetGroupBy.apply
510+
core.groupby.DatasetGroupBy.reduce
511+
499512
Rolling objects
500513
===============
501514

@@ -509,18 +522,27 @@ Rolling objects
509522
core.rolling.DatasetRolling.construct
510523
core.rolling.DatasetRolling.reduce
511524

512-
GroupByObjects
513-
==============
525+
Resample objects
526+
================
527+
528+
Resample objects also implement the GroupBy interface
529+
(methods like ``apply()``, ``reduce()``, ``mean()``, ``sum()``, etc.).
514530

515531
.. autosummary::
516532
:toctree: generated/
517533

518-
core.groupby.DataArrayGroupBy
519-
core.groupby.DataArrayGroupBy.apply
520-
core.groupby.DataArrayGroupBy.reduce
521-
core.groupby.DatasetGroupBy
522-
core.groupby.DatasetGroupBy.apply
523-
core.groupby.DatasetGroupBy.reduce
534+
core.resample.DataArrayResample
535+
core.resample.DataArrayResample.asfreq
536+
core.resample.DataArrayResample.backfill
537+
core.resample.DataArrayResample.interpolate
538+
core.resample.DataArrayResample.nearest
539+
core.resample.DataArrayResample.pad
540+
core.resample.DatasetResample
541+
core.resample.DatasetResample.asfreq
542+
core.resample.DatasetResample.backfill
543+
core.resample.DatasetResample.interpolate
544+
core.resample.DatasetResample.nearest
545+
core.resample.DatasetResample.pad
524546

525547
Custom Indexes
526548
==============

doc/faq.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _faq:
2+
13
Frequently Asked Questions
24
==========================
35

@@ -129,8 +131,8 @@ What other netCDF related Python libraries should I know about?
129131
`netCDF4-python`__ provides a lower level interface for working with
130132
netCDF and OpenDAP datasets in Python. We use netCDF4-python internally in
131133
xarray, and have contributed a number of improvements and fixes upstream. xarray
132-
does not yet support all of netCDF4-python's features, such as writing to
133-
netCDF groups or modifying files on-disk.
134+
does not yet support all of netCDF4-python's features, such as modifying files
135+
on-disk.
134136

135137
__ https://github.com/Unidata/netcdf4-python
136138

@@ -153,10 +155,12 @@ __ http://drclimate.wordpress.com/2014/01/02/a-beginners-guide-to-scripting-with
153155

154156
We think the design decisions we have made for xarray (namely, basing it on
155157
pandas) make it a faster and more flexible data analysis tool. That said, Iris
156-
and CDAT have some great domain specific functionality, and we would love to
157-
have support for converting their native objects to and from xarray (see
158-
:issue:`37` and :issue:`133`)
158+
and CDAT have some great domain specific functionality, and xarray includes
159+
methods for converting back and forth between xarray and these libraries. See
160+
:py:meth:`~xarray.DataArray.to_iris` and :py:meth:`~xarray.DataArray.to_cdms2`
161+
for more details.
159162

163+
.. _faq.other_projects:
160164

161165
What other projects leverage xarray?
162166
------------------------------------

doc/whats-new.rst

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,33 +31,37 @@ What's New
3131
v0.10.4 (unreleased)
3232
--------------------
3333

34+
The minor release includes a number of bug-fixes and backwards compatible
35+
enhancements. A highlight is ``CFTimeIndex``, which offers support for
36+
non-standard calendars used in climate modeling.
37+
3438
Documentation
3539
~~~~~~~~~~~~~
36-
- `FAQ <http://xarray.pydata.org/en/stable/faq.html#what-other-projects-leverage-xarray>`_ now lists projects that leverage xarray.
40+
41+
- New FAQ entry, :ref:`faq.other_projects`.
3742
By `Deepak Cherian <https://github.com/dcherian>`_.
38-
- `Assigning values with indexing <http://xarray.pydata.org/en/stable/indexing.html#assigning-values-with-indexing>`_ now includes examples on how to select and assign values to a :py:class:`~xarray.DataArray`.
43+
- :ref:`assigning_values` now includes examples on how to select and assign
44+
values to a :py:class:`~xarray.DataArray` with ``.loc``.
3945
By `Chiara Lepore <https://github.com/chiaral>`_.
4046

41-
4247
Enhancements
4348
~~~~~~~~~~~~
4449

45-
- Slight modification in `rolling` with dask.array and bottleneck. Also, fixed a bug in rolling an
46-
integer dask array.
47-
By `Keisuke Fujii <https://github.com/fujiisoup>`_.
4850
- Add an option for using a ``CFTimeIndex`` for indexing times with
4951
non-standard calendars and/or outside the Timestamp-valid range; this index
5052
enables a subset of the functionality of a standard
51-
``pandas.DatetimeIndex`` (:issue:`789`, :issue:`1084`, :issue:`1252`).
53+
``pandas.DatetimeIndex``.
54+
See :ref:`CFTimeIndex` for full details.
55+
(:issue:`789`, :issue:`1084`, :issue:`1252`)
5256
By `Spencer Clark <https://github.com/spencerkclark>`_ with help from
5357
`Stephan Hoyer <https://github.com/shoyer>`_.
5458
- Allow for serialization of ``cftime.datetime`` objects (:issue:`789`,
5559
:issue:`1084`, :issue:`2008`, :issue:`1252`) using the standalone ``cftime``
56-
library. By `Spencer Clark
57-
<https://github.com/spencerkclark>`_.
60+
library.
61+
By `Spencer Clark <https://github.com/spencerkclark>`_.
5862
- Support writing lists of strings as netCDF attributes (:issue:`2044`).
5963
By `Dan Nowacki <https://github.com/dnowacki-usgs>`_.
60-
- :py:meth:`~xarray.Dataset.to_netcdf(engine='h5netcdf')` now accepts h5py
64+
- :py:meth:`~xarray.Dataset.to_netcdf` with ``engine='h5netcdf'`` now accepts h5py
6165
encoding settings ``compression`` and ``compression_opts``, along with the
6266
NetCDF4-Python style settings ``gzip=True`` and ``complevel``.
6367
This allows using any compression plugin installed in hdf5, e.g. LZF
@@ -66,7 +70,8 @@ Enhancements
6670
This greatly boosts speed and allows chunking on the core dims.
6771
The function now requires dask >= 0.17.3 to work on dask-backed data
6872
(:issue:`2074`). By `Guido Imperiale <https://github.com/crusaderky>`_.
69-
- ``plot.line()`` learned new kwargs: ``xincrease``, ``yincrease`` that change the direction of the respective axes.
73+
- ``plot.line()`` learned new kwargs: ``xincrease``, ``yincrease`` that change
74+
the direction of the respective axes.
7075
By `Deepak Cherian <https://github.com/dcherian>`_.
7176

7277
- Added the ``parallel`` option to :py:func:`open_mfdataset`. This option uses
@@ -85,22 +90,24 @@ Enhancements
8590
Bug fixes
8691
~~~~~~~~~
8792

88-
- Now raises an Error if a coordinate with wrong size is assigned to a
89-
:py:class:`~xarray.DataArray`. (:issue:`2112`)
93+
- ``ValueError`` is raised when coordinates with the wrong size are assigned to
94+
a :py:class:`DataArray`. (:issue:`2112`)
9095
By `Keisuke Fujii <https://github.com/fujiisoup>`_.
91-
- Fixed a bug in `rolling` with bottleneck. Also, fixed a bug in rolling an
92-
integer dask array. (:issue:`2113`)
96+
- Fixed a bug in :py:meth:`~xarary.DatasArray.rolling` with bottleneck. Also,
97+
fixed a bug in rolling an integer dask array. (:issue:`2113`)
9398
By `Keisuke Fujii <https://github.com/fujiisoup>`_.
9499
- Fixed a bug where `keep_attrs=True` flag was neglected if
95-
:py:func:`apply_func` was used with :py:class:`Variable`. (:issue:`2114`)
100+
:py:func:`apply_ufunc` was used with :py:class:`Variable`. (:issue:`2114`)
96101
By `Keisuke Fujii <https://github.com/fujiisoup>`_.
97102
- When assigning a :py:class:`DataArray` to :py:class:`Dataset`, any conflicted
98103
non-dimensional coordinates of the DataArray are now dropped.
99104
(:issue:`2068`)
100105
By `Keisuke Fujii <https://github.com/fujiisoup>`_.
101106
- Better error handling in ``open_mfdataset`` (:issue:`2077`).
102107
By `Stephan Hoyer <https://github.com/shoyer>`_.
103-
- ``plot.line()`` does not call ``autofmt_xdate()`` anymore. Instead it changes the rotation and horizontal alignment of labels without removing the x-axes of any other subplots in the figure (if any).
108+
- ``plot.line()`` does not call ``autofmt_xdate()`` anymore. Instead it changes
109+
the rotation and horizontal alignment of labels without removing the x-axes of
110+
any other subplots in the figure (if any).
104111
By `Deepak Cherian <https://github.com/dcherian>`_.
105112
- Colorbar limits are now determined by excluding ±Infs too.
106113
By `Deepak Cherian <https://github.com/dcherian>`_.

0 commit comments

Comments
 (0)