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

Add cross-links to API docstring from tutorial and user-guide #8311

Merged
merged 9 commits into from
Nov 5, 2023
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
]
)

nbsphinx_allow_errors = False
nbsphinx_allow_errors = True
amanbagrecha marked this conversation as resolved.
Show resolved Hide resolved

# -- General configuration ------------------------------------------------

Expand Down
6 changes: 6 additions & 0 deletions xarray/core/computation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1141,9 +1141,15 @@ def apply_ufunc(
numba.guvectorize
dask.array.apply_gufunc
xarray.map_blocks

:ref:`dask.automatic-parallelization`
User guide describing :py:func:`apply_ufunc` and :py:func:`map_blocks`.

:ref:`dask.automatic-parallelization`
Example guide describing :py:func:`apply_ufunc` for 1d array.

`*Tutorial on apply_ufunc* <https://tutorial.xarray.dev/advanced/map_blocks/map_blocks.html>`_
Advanced Tutorial on applying numpy function using ``apply_ufunc``
dcherian marked this conversation as resolved.
Show resolved Hide resolved
References
----------
.. [1] https://numpy.org/doc/stable/reference/ufuncs.html
Expand Down
3 changes: 3 additions & 0 deletions xarray/core/dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -5435,6 +5435,9 @@ def map_blocks(
dask.array.map_blocks, xarray.apply_ufunc, xarray.Dataset.map_blocks
xarray.DataArray.map_blocks

`**Tutorial on map_blocks** <https://tutorial.xarray.dev/advanced/map_blocks/map_blocks.html>`_
Advanced Tutorial on map_blocks with dask

Examples
--------
Calculate an anomaly from climatology using ``.groupby()``. Using
Expand Down
10 changes: 10 additions & 0 deletions xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2889,6 +2889,12 @@ def isel(
--------
Dataset.sel
DataArray.isel


`**Tutorial on indexing** <https://tutorial.xarray.dev/intermediate/indexing/advanced-indexing.html>`_
Intermediate Tutorial on applying advanced indexing on dataset

dcherian marked this conversation as resolved.
Show resolved Hide resolved

"""
indexers = either_dict_or_kwargs(indexers, indexers_kwargs, "isel")
if any(is_fancy_indexer(idx) for idx in indexers.values()):
Expand Down Expand Up @@ -8633,6 +8639,10 @@ def map_blocks(
dask.array.map_blocks, xarray.apply_ufunc, xarray.Dataset.map_blocks
xarray.DataArray.map_blocks

`**Tutorial on map_blocks** <https://tutorial.xarray.dev/advanced/map_blocks/simple_map_blocks.html>`_
Advanced Tutorial on map_blocks with dask
dcherian marked this conversation as resolved.
Show resolved Hide resolved


Examples
--------
Calculate an anomaly from climatology using ``.groupby()``. Using
Expand Down
Loading