Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docstring fixes #423

Merged
merged 1 commit into from
Jun 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions xray/backends/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ def open_dataset(filename_or_obj, group=None, decode_cf=True,
-------
dataset : Dataset
The newly created dataset.

See Also
--------
open_mfdataset
"""
if not decode_cf:
mask_and_scale = False
Expand Down Expand Up @@ -165,7 +169,7 @@ def open_mfdataset(paths, chunks=None, concat_dim=None, **kwargs):
Parameters
----------
paths : str or sequence
Either a str glob in the form "path/to/my/files/*.nc" or an explicit
Either a string glob in the form "path/to/my/files/*.nc" or an explicit
list of files to open.
chunks : dict, optional
Dictionary with keys given by dimension names and values given by chunk
Expand All @@ -175,13 +179,21 @@ def open_mfdataset(paths, chunks=None, concat_dim=None, **kwargs):
full documentation for more details.
concat_dim : str or DataArray or Index, optional
Dimension to concatenate files along. This argument is passed on to
``auto_combine`` along with the dataset objects.
:py:func:`xray.auto_combine` along with the dataset objects. You only
need to provide this argument if the dimension along which you want to
concatenate is not a dimension in the original datasets, e.g., if you
want to stack a collection of 2D arrays along a third dimension.
**kwargs : optional
Additional arguments passed on to ``open_dataset``.
Additional arguments passed on to :py:func:`xray.open_dataset`.

Returns
-------
xray.Dataset

See Also
--------
auto_combine
open_dataset
"""
if isinstance(paths, basestring):
paths = sorted(glob(paths))
Expand Down
8 changes: 6 additions & 2 deletions xray/core/alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def auto_combine(datasets, concat_dim=None):
under any circumstances. It will fail in complex cases, for which you
should use ``concat`` and ``merge`` explicitly.

Example of when ``auto_combine`` works:
When ``auto_combine`` may succeed:

* You have N years of data and M data variables. Each combination of a
distinct time period and test of data variables is saved its own dataset.
Expand All @@ -331,7 +331,11 @@ def auto_combine(datasets, concat_dim=None):
datasets : sequence of xray.Dataset
Dataset objects to merge.
concat_dim : str or DataArray or Index, optional
Dimension along which to concatenate variables.
Dimension along which to concatenate variables, as used by
:py:func:`xray.concat`. You only need to provide this argument if the
dimension along which you want to concatenate is not a dimension in
the original datasets, e.g., if you want to stack a collection of
2D arrays along a third dimension.

Returns
-------
Expand Down