File tree 4 files changed +13
-6
lines changed
4 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -511,6 +511,13 @@ Notice that the 0-shaped sizes were not printed to screen. Since ``template`` ha
511
511
mapped.identical(expected)
512
512
513
513
514
+ .. tip ::
515
+
516
+ As :py:func: `map_blocks ` loads each block into memory, reduce as much as possible objects consumed by user functions.
517
+ For example, drop useless variables before calling ``func `` with :py:func: `map_blocks `.
518
+
519
+
520
+
514
521
Chunking and performance
515
522
------------------------
516
523
Original file line number Diff line number Diff line change @@ -3666,8 +3666,8 @@ def map_blocks(
3666
3666
Notes
3667
3667
-----
3668
3668
This function is designed for when ``func`` needs to manipulate a whole xarray object
3669
- subset to each block. In the more common case where ``func`` can work on numpy arrays, it is
3670
- recommended to use ``apply_ufunc``.
3669
+ subset to each block. Each block is loaded into memory. In the more common case where
3670
+ ``func`` can work on numpy arrays, it is recommended to use ``apply_ufunc``.
3671
3671
3672
3672
If none of the variables in this object is backed by dask arrays, calling this function is
3673
3673
equivalent to calling ``func(obj, *args, **kwargs)``.
Original file line number Diff line number Diff line change @@ -6274,8 +6274,8 @@ def map_blocks(
6274
6274
Notes
6275
6275
-----
6276
6276
This function is designed for when ``func`` needs to manipulate a whole xarray object
6277
- subset to each block. In the more common case where ``func`` can work on numpy arrays, it is
6278
- recommended to use ``apply_ufunc``.
6277
+ subset to each block. Each block is loaded into memory. In the more common case where
6278
+ ``func`` can work on numpy arrays, it is recommended to use ``apply_ufunc``.
6279
6279
6280
6280
If none of the variables in this object is backed by dask arrays, calling this function is
6281
6281
equivalent to calling ``func(obj, *args, **kwargs)``.
Original file line number Diff line number Diff line change @@ -208,8 +208,8 @@ def map_blocks(
208
208
Notes
209
209
-----
210
210
This function is designed for when ``func`` needs to manipulate a whole xarray object
211
- subset to each block. In the more common case where ``func`` can work on numpy arrays, it is
212
- recommended to use ``apply_ufunc``.
211
+ subset to each block. Each block is loaded into memory. In the more common case where
212
+ ``func`` can work on numpy arrays, it is recommended to use ``apply_ufunc``.
213
213
214
214
If none of the variables in ``obj`` is backed by dask arrays, calling this function is
215
215
equivalent to calling ``func(obj, *args, **kwargs)``.
You can’t perform that action at this time.
0 commit comments