Skip to content

Commit

Permalink
Fix copybutton and sample dim name in docstring (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrjones authored Aug 9, 2022
1 parent 613a1cd commit 3d16162
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
6 changes: 6 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ def setup(app):
'issue': ('https://github.com/pangeo-data/xbatcher/issues/%s', 'GH')
}

# sphinx-copybutton configurations (from https://github.com/pydata/xarray/blob/main/doc/conf.py)
copybutton_prompt_text = (
r'>>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: '
)
copybutton_prompt_is_regexp = True

autosummary_generate = True
numpydoc_class_members_toctree = False
numpydoc_show_class_members = False
Expand Down
11 changes: 7 additions & 4 deletions xbatcher/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,20 @@ class BatchGenerator:
A dictionary specifying the size of the inputs in each dimension,
e.g. ``{'lat': 30, 'lon': 30}``
These are the dimensions the ML library will see. All other dimensions
will be stacked into one dimension called ``batch``.
will be stacked into one dimension called ``sample``.
input_overlap : dict, optional
A dictionary specifying the overlap along each dimension
e.g. ``{'lat': 3, 'lon': 3}``
batch_dims : dict, optional
A dictionary specifying the size of the batch along each dimension
e.g. ``{'time': 10}``. These will always be interated over.
e.g. ``{'time': 10}``. These will always be iterated over.
concat_input_dims : bool, optional
If ``True``, the dimension chunks specified in ``input_dims`` will be
concatenated and stacked into the batch dimension. If ``False``, they
will be iterated over.
concatenated and stacked into the ``sample`` dimension. The batch index
will be included as a new level ``input_batch`` in the ``sample``
coordinate.
If ``False``, the dimension chunks specified in ``input_dims`` will be
iterated over.
preload_batch : bool, optional
If ``True``, each batch will be loaded into memory before reshaping /
processing, triggering any dask arrays to be computed.
Expand Down

0 comments on commit 3d16162

Please sign in to comment.