Skip to content

Commit 774c8c7

Browse files
committed
fix docs
1 parent 3960ea1 commit 774c8c7

File tree

6 files changed

+27
-15
lines changed

6 files changed

+27
-15
lines changed

docs/api-reference.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,3 @@
1919
sinc
2020
```
2121

22-
## Testing utilities
23-
24-
```{eval-rst}
25-
.. currentmodule:: array_api_extra.testing
26-
.. autosummary::
27-
:nosignatures:
28-
:toctree: generated
29-
30-
lazy_xp_function
31-
patch_lazy_xp_functions
32-
```

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
:hidden:
66
self
77
api-reference.md
8+
testing-utils.md
89
contributing.md
910
contributors.md
1011
```

docs/testing-utils.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Testing Utilities
2+
3+
These additional functions are meant to be used while unit testing
4+
Array API compliant packages:
5+
6+
```{eval-rst}
7+
.. currentmodule:: array_api_extra.testing
8+
.. autosummary::
9+
:nosignatures:
10+
:toctree: generated
11+
12+
lazy_xp_function
13+
patch_lazy_xp_functions
14+
```

pixi.lock

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ sphinx-autodoc-typehints = "*"
105105
# Needed to import parsed modules with autodoc
106106
dask-core = "*"
107107
pytest = "*"
108+
typing-extensions = "*"
108109

109110
[tool.pixi.feature.docs.tasks]
110111
docs = { cmd = "sphinx-build . build/", cwd = "docs" }

src/array_api_extra/testing.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,10 @@ def lazy_xp_function( # type: ignore[no-any-explicit]
111111
lazy_xp_function(myfunc)
112112
113113
def test_myfunc(xp):
114-
a = xp.asarray([1, 2]) # When xp=jax.numpy, this is the same as `b =
115-
jax.jit(myfunc)(a)` # When xp=dask.array, crash on compute() or persist() b =
116-
myfunc(a)
114+
a = xp.asarray([1, 2])
115+
# When xp=jax.numpy, this is the same as `b = jax.jit(myfunc)(a)`
116+
# When xp=dask.array, crash on compute() or persist()
117+
b = myfunc(a)
117118
118119
Notes
119120
-----

0 commit comments

Comments
 (0)