Skip to content
forked from pydata/xarray

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into dask-median
Browse files Browse the repository at this point in the history
* upstream/master:
  added pyinterp to related projects (pydata#3655)
  Allow incomplete hypercubes in combine_by_coords (pydata#3649)
  concat keeps attrs from first variable. (pydata#3637)
  Extend DatetimeAccessor properties and support `.dt` accessor for Timedelta (pydata#3612)
  update readthedocs.yml (pydata#3639)
  silence sphinx warnings round 3 (pydata#3602)
  Fix/quantile wrong errmsg (pydata#3635)
  Provide shape info in shape mismatch error. (pydata#3619)
  Minor doc fixes (pydata#3615)
  Respect user-specified coordinates attribute. (pydata#3487)
  Add Facetgrid.row_labels & Facetgrid.col_labels (pydata#3597)
  Fix pint integration tests (pydata#3600)
  Minor fix to combine_by_coords to allow for the combination of CFTimeIndexes separated by large time intervals (pydata#3543)
dcherian committed Dec 30, 2019
2 parents 905a901 + cc22f41 commit 42a7ed3
Showing 33 changed files with 2,552 additions and 1,282 deletions.
653 changes: 652 additions & 1 deletion doc/api-hidden.rst

Large diffs are not rendered by default.

56 changes: 55 additions & 1 deletion doc/api.rst
Original file line number Diff line number Diff line change
@@ -31,6 +31,8 @@ Top-level functions
ones_like
dot
map_blocks
show_versions
set_options

Dataset
=======
@@ -74,7 +76,9 @@ and values given by ``DataArray`` objects.
Dataset.__setitem__
Dataset.__delitem__
Dataset.update
Dataset.get
Dataset.items
Dataset.keys
Dataset.values

Dataset contents
@@ -537,6 +541,15 @@ DataArray methods
DataArray.unify_chunks
DataArray.map_blocks

Coordinates objects
===================

.. autosummary::
:toctree: generated/

core.coordinates.DataArrayCoordinates
core.coordinates.DatasetCoordinates

GroupBy objects
===============

@@ -564,6 +577,16 @@ Rolling objects
core.rolling.DatasetRolling.reduce
core.rolling_exp.RollingExp

Coarsen objects
===============

.. autosummary::
:toctree: generated/

core.rolling.DataArrayCoarsen
core.rolling.DatasetCoarsen


Resample objects
================

@@ -593,6 +616,7 @@ Accessors
:toctree: generated/

core.accessor_dt.DatetimeAccessor
core.accessor_dt.TimedeltaAccessor
core.accessor_str.StringAccessor

Custom Indexes
@@ -627,6 +651,33 @@ Plotting
plot.pcolormesh
plot.FacetGrid

Faceting
--------
.. autosummary::
:toctree: generated/

plot.FacetGrid
plot.FacetGrid.add_colorbar
plot.FacetGrid.add_legend
plot.FacetGrid.map
plot.FacetGrid.map_dataarray
plot.FacetGrid.map_dataarray_line
plot.FacetGrid.map_dataset
plot.FacetGrid.set_axis_labels
plot.FacetGrid.set_ticks
plot.FacetGrid.set_titles
plot.FacetGrid.set_xlabels
plot.FacetGrid.set_ylabels

Tutorial
========

.. autosummary::
:toctree: generated/

tutorial.open_dataset
tutorial.load_dataset

Testing
=======

@@ -663,7 +714,7 @@ Advanced API

These backends provide a low-level interface for lazily loading data from
external file-formats or protocols, and can be manually invoked to create
arguments for the ``from_store`` and ``dump_to_store`` Dataset methods:
arguments for the ``load_store`` and ``dump_to_store`` Dataset methods:

.. autosummary::
:toctree: generated/
@@ -679,6 +730,9 @@ arguments for the ``from_store`` and ``dump_to_store`` Dataset methods:
Deprecated / Pending Deprecation
================================

.. autosummary::
:toctree: generated/

Dataset.drop
DataArray.drop
Dataset.apply
6 changes: 3 additions & 3 deletions doc/groupby.rst
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ Apply
~~~~~

To apply a function to each group, you can use the flexible
:py:meth:`~xarray.DatasetGroupBy.map` method. The resulting objects are automatically
:py:meth:`~xarray.core.groupby.DatasetGroupBy.map` method. The resulting objects are automatically
concatenated back together along the group axis:

.. ipython:: python
@@ -104,8 +104,8 @@ concatenated back together along the group axis:
arr.groupby('letters').map(standardize)
GroupBy objects also have a :py:meth:`~xarray.DatasetGroupBy.reduce` method and
methods like :py:meth:`~xarray.DatasetGroupBy.mean` as shortcuts for applying an
GroupBy objects also have a :py:meth:`~xarray.core.groupby.DatasetGroupBy.reduce` method and
methods like :py:meth:`~xarray.core.groupby.DatasetGroupBy.mean` as shortcuts for applying an
aggregation function:

.. ipython:: python
4 changes: 2 additions & 2 deletions doc/howdoi.rst
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ How do I ...
* - change the order of dimensions
- :py:meth:`DataArray.transpose`, :py:meth:`Dataset.transpose`
* - remove a variable from my object
- :py:meth:`Dataset.drop`, :py:meth:`DataArray.drop`
- :py:meth:`Dataset.drop_vars`, :py:meth:`DataArray.drop_vars`
* - remove dimensions of length 1 or 0
- :py:meth:`DataArray.squeeze`, :py:meth:`Dataset.squeeze`
* - remove all variables with a particular dimension
@@ -48,7 +48,7 @@ How do I ...
* - write xarray objects with complex values to a netCDF file
- :py:func:`Dataset.to_netcdf`, :py:func:`DataArray.to_netcdf` specifying ``engine="h5netcdf", invalid_netcdf=True``
* - make xarray objects look like other xarray objects
- :py:func:`~xarray.ones_like`, :py:func:`~xarray.zeros_like`, :py:func:`~xarray.full_like`, :py:meth:`Dataset.reindex_like`, :py:meth:`Dataset.interpolate_like`, :py:meth:`Dataset.broadcast_like`, :py:meth:`DataArray.reindex_like`, :py:meth:`DataArray.interpolate_like`, :py:meth:`DataArray.broadcast_like`
- :py:func:`~xarray.ones_like`, :py:func:`~xarray.zeros_like`, :py:func:`~xarray.full_like`, :py:meth:`Dataset.reindex_like`, :py:meth:`Dataset.interp_like`, :py:meth:`Dataset.broadcast_like`, :py:meth:`DataArray.reindex_like`, :py:meth:`DataArray.interp_like`, :py:meth:`DataArray.broadcast_like`
* - replace NaNs with other values
- :py:meth:`Dataset.fillna`, :py:meth:`Dataset.ffill`, :py:meth:`Dataset.bfill`, :py:meth:`Dataset.interpolate_na`, :py:meth:`DataArray.fillna`, :py:meth:`DataArray.ffill`, :py:meth:`DataArray.bfill`, :py:meth:`DataArray.interpolate_na`
* - extract the year, month, day or similar from a DataArray of time values
2 changes: 1 addition & 1 deletion doc/indexing.rst
Original file line number Diff line number Diff line change
@@ -132,7 +132,7 @@ use them explicitly to slice data. There are two ways to do this:
The arguments to these methods can be any objects that could index the array
along the dimension given by the keyword, e.g., labels for an individual value,
Python :py:func:`slice` objects or 1-dimensional arrays.
Python :py:class:`slice` objects or 1-dimensional arrays.

.. note::

4 changes: 2 additions & 2 deletions doc/interpolation.rst
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ array-like, which gives the interpolated result as an array.
# interpolation
da.interp(time=[2.5, 3.5])
To interpolate data with a :py:func:`numpy.datetime64` coordinate you can pass a string.
To interpolate data with a :py:doc:`numpy.datetime64 <reference/arrays.datetime>` coordinate you can pass a string.

.. ipython:: python
@@ -128,7 +128,7 @@ It is now possible to safely compute the difference ``other - interpolated``.
Interpolation methods
---------------------

We use :py:func:`scipy.interpolate.interp1d` for 1-dimensional interpolation and
We use :py:class:`scipy.interpolate.interp1d` for 1-dimensional interpolation and
:py:func:`scipy.interpolate.interpn` for multi-dimensional interpolation.

The interpolation method can be specified by the optional ``method`` argument.
Loading

0 comments on commit 42a7ed3

Please sign in to comment.