Skip to content

Commit 2d007e0

Browse files
committed
ENH: New function lazy_apply
1 parent f9b4dcf commit 2d007e0

File tree

14 files changed

+541
-40
lines changed

14 files changed

+541
-40
lines changed

docs/api-lazy.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Tools for lazy backends
2+
3+
These additional functions are meant to be used to support compatibility with
4+
lazy backends, e.g. Dask or Jax:
5+
6+
```{eval-rst}
7+
.. currentmodule:: array_api_extra
8+
.. autosummary::
9+
:nosignatures:
10+
:toctree: generated
11+
12+
lazy_apply
13+
testing.lazy_xp_function
14+
testing.patch_lazy_xp_functions
15+
```

docs/conf.py

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353

5454
intersphinx_mapping = {
5555
"python": ("https://docs.python.org/3", None),
56+
"numpy": ("https://numpy.org/doc/stable", None),
57+
"dask": ("https://docs.dask.org/en/stable", None),
5658
"jax": ("https://jax.readthedocs.io/en/latest", None),
5759
}
5860

docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
:hidden:
66
self
77
api-reference.md
8-
testing-utils.md
8+
api-lazy.md
99
contributing.md
1010
contributors.md
1111
```

docs/testing-utils.md

-14
This file was deleted.

pixi.lock

+30-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+2-6
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ sphinx-autodoc-typehints = "*"
106106
dask-core = "*"
107107
pytest = "*"
108108
typing-extensions = "*"
109+
numpy = "*"
109110

110111
[tool.pixi.feature.docs.tasks]
111112
docs = { cmd = "sphinx-build . build/", cwd = "docs" }
@@ -311,10 +312,5 @@ checks = [
311312
"ES01", # most docstrings do not need an extended summary
312313
]
313314
exclude = [ # don't report on objects that match any of these regex
314-
'.*test_at.*',
315-
'.*test_funcs.*',
316-
'.*test_testing.*',
317-
'.*test_utils.*',
318-
'.*test_version.*',
319-
'.*test_vendor.*',
315+
'.*test_*',
320316
]

src/array_api_extra/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
setdiff1d,
1313
sinc,
1414
)
15+
from ._lib._lazy import lazy_apply
1516

1617
__version__ = "0.6.1.dev0"
1718

@@ -25,6 +26,7 @@
2526
"expand_dims",
2627
"isclose",
2728
"kron",
29+
"lazy_apply",
2830
"nunique",
2931
"pad",
3032
"setdiff1d",

0 commit comments

Comments
 (0)