diff --git a/README.md b/README.md index d90efa3..b7b6f3d 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ xp = array_api_compat.array_namespace(x) There are multiple ways to type functions: - ```python - from array_api._2024_12 import Array + from array_api.latest import Array def simple(x: Array) -> Array: return x + 1 @@ -92,7 +92,7 @@ You can test if an object matches the Protocol as they are [`runtime-checkable`] ```python import array_api_strict -from array_api._2024_12 import ArrayNamespace, ArrayNamespaceFull +from array_api.latest import ArrayNamespace, ArrayNamespaceFull assert isinstance(array_api_strict, ArrayNamespace) @@ -106,7 +106,7 @@ assert not isinstance(array_api_strict, ArrayNamespaceFull) - To clarify the input and output shapes, `ShapedArray` and `ShapedAnyArray` can be used: ```python - from array_api._2024_12 import ShapedAnyArray as Array + from array_api.latest import ShapedAnyArray as Array def sum_last_axis[*TShape](x: Array[*TShape, Any]) -> Array[*TShape]: return xp.sum(x, axis=-1) diff --git a/docs/conf.py b/docs/conf.py index 73e6a26..a40087d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,8 +27,10 @@ "myst_parser", "sphinx.ext.napoleon", "sphinx.ext.autodoc", + "sphinx.ext.autosummary", "sphinx.ext.viewcode", ] +autosummary_generate = True napoleon_google_docstring = False # The suffix of source filenames. @@ -78,6 +80,7 @@ def run_apidoc(_: Any) -> None: "--force", "--module-first", "--private", + "--separate", "-o", docs_path.as_posix(), module_path.as_posix(), diff --git a/src/array_api/latest.py b/src/array_api/latest.py new file mode 100644 index 0000000..d2672b1 --- /dev/null +++ b/src/array_api/latest.py @@ -0,0 +1 @@ +from ._2024_12 import * # noqa diff --git a/src/array_api_compat/__init__.pyi b/src/array_api_compat/__init__.pyi index eef5b96..18eac3d 100644 --- a/src/array_api_compat/__init__.pyi +++ b/src/array_api_compat/__init__.pyi @@ -1,6 +1,6 @@ from typing import Any, Literal -from array_api._2024_12 import Array, ArrayNamespaceFull +from array_api.latest import Array, ArrayNamespaceFull # return full namespace for convenience # because optional attributes are not supported diff --git a/tests/test_main.py b/tests/test_main.py index 92750f2..375537b 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -3,7 +3,7 @@ import array_api_strict -from array_api._2024_12 import ArrayNamespace +from array_api.latest import ArrayNamespace def test_strict_supset_namespace():