Skip to content

Commit

Permalink
ENH: New function lazy_apply
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Jan 29, 2025
1 parent c23ac01 commit de67dc1
Show file tree
Hide file tree
Showing 11 changed files with 535 additions and 40 deletions.
15 changes: 15 additions & 0 deletions docs/api-lazy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Tools for lazy backends

These additional functions are meant to be used to support compatibility with
lazy backends, e.g. Dask or Jax:

```{eval-rst}
.. currentmodule:: array_api_extra
.. autosummary::
:nosignatures:
:toctree: generated
lazy_apply
testing.lazy_xp_function
testing.patch_lazy_xp_functions
```
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"numpy": ("https://numpy.org/doc/stable", None),
"dask": ("https://docs.dask.org/en/stable", None),
"jax": ("https://jax.readthedocs.io/en/latest", None),
}

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:hidden:
self
api-reference.md
testing-utils.md
api-lazy.md
contributing.md
contributors.md
```
Expand Down
14 changes: 0 additions & 14 deletions docs/testing-utils.md

This file was deleted.

31 changes: 30 additions & 1 deletion pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ sphinx-autodoc-typehints = "*"
dask-core = "*"
pytest = "*"
typing-extensions = "*"
numpy = "*"

[tool.pixi.feature.docs.tasks]
docs = { cmd = "sphinx-build . build/", cwd = "docs" }
Expand Down Expand Up @@ -311,10 +312,5 @@ checks = [
"ES01", # most docstrings do not need an extended summary
]
exclude = [ # don't report on objects that match any of these regex
'.*test_at.*',
'.*test_funcs.*',
'.*test_testing.*',
'.*test_utils.*',
'.*test_version.*',
'.*test_vendor.*',
'.*test_*',
]
2 changes: 2 additions & 0 deletions src/array_api_extra/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
setdiff1d,
sinc,
)
from ._lib._lazy import lazy_apply

__version__ = "0.6.1.dev0"

Expand All @@ -25,6 +26,7 @@
"expand_dims",
"isclose",
"kron",
"lazy_apply",
"nunique",
"pad",
"setdiff1d",
Expand Down
Loading

0 comments on commit de67dc1

Please sign in to comment.