Skip to content

DOC: add Dask note to lazy_apply #189

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

Merged
merged 1 commit into from
Mar 27, 2025
Merged
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
7 changes: 6 additions & 1 deletion src/array_api_extra/_lib/_lazy.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,12 @@ def lazy_apply( # type: ignore[valid-type] # numpydoc ignore=GL07,SA04

Dask
This allows applying eager functions to Dask arrays.
The Dask graph won't be computed.
The Dask graph won't be computed until the user calls ``compute()`` or
``persist()`` down the line.

The function name will be prominently visible on the user-facing Dask
dashboard and on Prometheus metrics, so it is recommended for it to be
meaningful.

`lazy_apply` doesn't know if `func` reduces along any axes; also, shape
changes are non-trivial in chunked Dask arrays. For these reasons, all inputs
Expand Down