diff --git a/src/ragged/__init__.py b/src/ragged/__init__.py index 9c22773..d8d04be 100644 --- a/src/ragged/__init__.py +++ b/src/ragged/__init__.py @@ -1,8 +1,13 @@ # BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE -from __future__ import annotations +""" +Ragged array module. + +FIXME: needs more documentation! -from ._version import version as __version__ -from .v202212 import array +Version 2022.12 is current, so `ragged.v202212.*` is identical to `ragged.*`. +""" + +from __future__ import annotations -__all__ = ["array", "__version__"] +from .v202212 import * # noqa: F403 diff --git a/src/ragged/common/__init__.py b/src/ragged/common/__init__.py index 89b442f..dcc9188 100644 --- a/src/ragged/common/__init__.py +++ b/src/ragged/common/__init__.py @@ -1,5 +1,12 @@ # BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE +""" +Generic definitions used by the version-specific modules, such as +`ragged.v202212`. + +https://data-apis.org/array-api/latest/API_specification/ +""" + from __future__ import annotations from ._obj import array diff --git a/src/ragged/common/_obj.py b/src/ragged/common/_obj.py index 920f582..a6aafc6 100644 --- a/src/ragged/common/_obj.py +++ b/src/ragged/common/_obj.py @@ -877,6 +877,3 @@ def __irshift__(self, other: int | array, /) -> array: __rxor__ = __xor__ __rlshift__ = __lshift__ __rrshift__ = __rshift__ - - -__all__ = ["array"] diff --git a/src/ragged/v202212/__init__.py b/src/ragged/v202212/__init__.py index 89b442f..b49396c 100644 --- a/src/ragged/v202212/__init__.py +++ b/src/ragged/v202212/__init__.py @@ -1,5 +1,14 @@ # BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE +""" +Defines a ragged array module that is compliant with version 2022.12 of the +Array API. + +This is the current default: `ragged.v202212.*` is imported into `ragged.*`. + +https://data-apis.org/array-api/2022.12/API_specification/ +""" + from __future__ import annotations from ._obj import array