Skip to content

Commit 5200a18

Browse files
Update map_blocks and map_overlap docstrings (#4303)
This reference an `obj` argument that only exists in parallel. The object being referenced is actually `self`.
1 parent f99c6cc commit 5200a18

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

xarray/core/dataarray.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3312,24 +3312,21 @@ def map_blocks(
33123312
33133313
This function cannot add a new chunked dimension.
33143314
3315-
obj: DataArray, Dataset
3316-
Passed to the function as its first argument, one block at a time.
33173315
args: Sequence
33183316
Passed to func after unpacking and subsetting any xarray objects by blocks.
3319-
xarray objects in args must be aligned with obj, otherwise an error is raised.
3317+
xarray objects in args must be aligned with this object, otherwise an error is raised.
33203318
kwargs: Mapping
33213319
Passed verbatim to func after unpacking. xarray objects, if any, will not be
33223320
subset to blocks. Passing dask collections in kwargs is not allowed.
33233321
template: (optional) DataArray, Dataset
33243322
xarray object representing the final result after compute is called. If not provided,
3325-
the function will be first run on mocked-up data, that looks like ``obj`` but
3323+
the function will be first run on mocked-up data, that looks like this object but
33263324
has sizes 0, to determine properties of the returned object such as dtype,
33273325
variable names, attributes, new dimensions and new indexes (if any).
33283326
``template`` must be provided if the function changes the size of existing dimensions.
33293327
When provided, ``attrs`` on variables in `template` are copied over to the result. Any
33303328
``attrs`` set by ``func`` will be ignored.
33313329
3332-
33333330
Returns
33343331
-------
33353332
A single DataArray or Dataset with dask backend, reassembled from the outputs of the
@@ -3341,7 +3338,7 @@ def map_blocks(
33413338
subset to each block. In the more common case where ``func`` can work on numpy arrays, it is
33423339
recommended to use ``apply_ufunc``.
33433340
3344-
If none of the variables in ``obj`` is backed by dask arrays, calling this function is
3341+
If none of the variables in this object is backed by dask arrays, calling this function is
33453342
equivalent to calling ``func(obj, *args, **kwargs)``.
33463343
33473344
See Also

xarray/core/dataset.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5770,8 +5770,6 @@ def map_blocks(
57705770
57715771
This function cannot add a new chunked dimension.
57725772
5773-
obj: DataArray, Dataset
5774-
Passed to the function as its first argument, one block at a time.
57755773
args: Sequence
57765774
Passed to func after unpacking and subsetting any xarray objects by blocks.
57775775
xarray objects in args must be aligned with obj, otherwise an error is raised.
@@ -5780,7 +5778,7 @@ def map_blocks(
57805778
subset to blocks. Passing dask collections in kwargs is not allowed.
57815779
template: (optional) DataArray, Dataset
57825780
xarray object representing the final result after compute is called. If not provided,
5783-
the function will be first run on mocked-up data, that looks like ``obj`` but
5781+
the function will be first run on mocked-up data, that looks like this object but
57845782
has sizes 0, to determine properties of the returned object such as dtype,
57855783
variable names, attributes, new dimensions and new indexes (if any).
57865784
``template`` must be provided if the function changes the size of existing dimensions.
@@ -5799,7 +5797,7 @@ def map_blocks(
57995797
subset to each block. In the more common case where ``func`` can work on numpy arrays, it is
58005798
recommended to use ``apply_ufunc``.
58015799
5802-
If none of the variables in ``obj`` is backed by dask arrays, calling this function is
5800+
If none of the variables in this object is backed by dask arrays, calling this function is
58035801
equivalent to calling ``func(obj, *args, **kwargs)``.
58045802
58055803
See Also

0 commit comments

Comments
 (0)