Skip to content

Commit

Permalink
Update docs to mention dask support
Browse files Browse the repository at this point in the history
  • Loading branch information
ajdawson committed May 3, 2019
1 parent e95c3d2 commit a7cab29
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 8 deletions.
9 changes: 9 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ Changelog

Source code downloads for released versions can be downloaded from `Github <https://github.com/ajdawson/eofs/releases>`_.

v1.4
----

:Release: v1.4.0
:Date: 2019

* Add support for dask arrays [:issue:`107`, :pr:`109`], thanks to `@ScottWales <https://github.com/ScottWales>`_.


v1.3
----

Expand Down
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@
'iris': ('http://scitools.org.uk/iris/docs/latest', None),
'numpy': ('http://docs.scipy.org/doc/numpy', None),
'xarray': ('http://xarray.pydata.org/en/stable', None),
'dask': ('https://docs.dask.org/en/latest', None),
}

# -- Options for LaTeX output --------------------------------------------------
Expand Down
7 changes: 5 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ You can also check out the source code for the development version from the `git
Getting started
---------------

`eofs` provides three interfaces for EOF analysis: one for analysing data contained in `numpy` arrays or masked arrays, suitable for any data set; and two for meta-data aware EOF analysis, suitable for analysing data read from self-describing files, using either the `cdms2`, `iris`, or `xarray` packages.
`eofs` provides various interfaces for EOF analysis: a *standard* interface for analysing data contained in either `numpy` arrays or `dask` arrays, suitable for any data set; and meta-data interfaces suitable for analysing data read from self-describing files, using the `cdms2`, `iris`, or `xarray` packages.
All the interfaces support the same set of operations.

Regardless of which interface you use, the basic usage is the same.
Expand Down Expand Up @@ -80,10 +80,11 @@ Requirements
------------

This package requires as a minimum that you have numpy_ available, and requires setuptools_ for installation.
The dask_ package is an optional dependency that will be used if `dask.array` is available and `dask` arrays are provided to the solver.
The `eofs.cdms` meta-data enabled interface can only be used if the `cdms2` module is available.
This module is distributed as part of the UV-CDAT_ project.
The `eofs.iris` meta-data enabled interface can only be used if the iris_ package is available at version 1.2 or higher.
The `eofs.xarray` meta-data enabled interface can only be used if the xarray_ package (or earlier xray package) is installed.
The `eofs.xarray` meta-data enabled interface can only be used if the xarray_ package is installed.


Citation
Expand All @@ -103,6 +104,8 @@ If you would like to contribute code or documentation please see the :doc:`devgu

.. _UV-CDAT: http://uv-cdat.llnl.gov

.. _dask: https://dask.org

.. _iris: http://scitools.org.uk/iris

.. _xarray: http://xarray.pydata.org
Expand Down
9 changes: 7 additions & 2 deletions doc/userguide/interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ cdms Data read from a self-describing data format stored in a `cdms2`
variable.
iris Data read from a self-describing data format stored in an `iris`
cube.
standard Other data, stored in a `numpy.ndarray` or a `numpy.ma.MaskedArray`.
xarray Data stored in an `xarray.DataArray`.
standard Other data, stored in a `numpy.ndarray`, a `numpy.ma.MaskedArray`,
or a `dask.array.Array`.
========= =====================================================================


Expand Down Expand Up @@ -47,7 +49,7 @@ The xarray interface works with `~xarray.DataArray` objects, which are the data
Standard interface
------------------

The standard interface works with `numpy` arrays, which makes the standard interface the general purpose interface. Any data that can be stored in a `numpy.ndarray` or `numpy.ma.MaskedArray` can be analysed with the `eofs.standard.Eof` solver interface.
The standard interface works with numpy_ arrays or dask_ arrays, which makes the standard interface the general purpose interface. Any data that can be stored in a `numpy.ndarray`, `numpy.ma.MaskedArray` or `dask.array.Array` can be analysed with the `eofs.standard.Eof` solver interface.


.. _iris: http://scitools.org.uk/iris
Expand All @@ -56,3 +58,6 @@ The standard interface works with `numpy` arrays, which makes the standard inter

.. _xarray: http://xarray.pydata.org

.. _dask: https://dask.org

.. _numpy: https://numpy.org
8 changes: 4 additions & 4 deletions lib/eofs/standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ def __init__(self, dataset, weights=None, center=True, ddof=1):
**Arguments:**
*dataset*
A `numpy.ndarray` or `numpy.ma.MaskedArray` with two or more
dimensions containing the data to be analysed. The first
dimension is assumed to represent time. Missing values are
permitted, either in the form of a masked array, or
A `numpy.ndarray`, `numpy.ma.MaskedArray` or `dask.array.Array`
with two or more dimensions containing the data to be analysed.
The first dimension is assumed to represent time. Missing
values are permitted, either in the form of a masked array, or
`numpy.nan` values. Missing values must be constant with time
(e.g., values of an oceanographic field over land).
Expand Down

0 comments on commit a7cab29

Please sign in to comment.