Skip to content

Commit 67d5e26

Browse files
authored
Merge pull request #480 from honno/dunder-version-namespace-attr
Include `__array_api_version__` in API specification section
2 parents b3b7bb6 + 1b0491b commit 67d5e26

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

Diff for: spec/API_specification/array_api/__init__.py

+6
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,9 @@
1212
from .statistical_functions import *
1313
from .utility_functions import *
1414
from . import linalg
15+
16+
17+
__array_api_version__: str = "YYYY.MM"
18+
"""
19+
String representing the version of the array API specification which the conforming implementation adheres to.
20+
"""

Diff for: spec/API_specification/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ API specification
2424
statistical_functions
2525
type_promotion
2626
utility_functions
27+
version

Diff for: spec/API_specification/version.rst

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Version
2+
=======
3+
4+
Array API specification for versioning.
5+
6+
A conforming implementation of the array API standard must provide a `__array_api_version__` attribute - see :ref:`api-versioning` for details.
7+
8+
9+
Objects in API
10+
--------------
11+
12+
.. currentmodule:: array_api
13+
14+
..
15+
NOTE: please keep the functions in alphabetical order
16+
17+
.. autosummary::
18+
:toctree: generated
19+
:template: attribute.rst
20+
:nosignatures:
21+
22+
__array_api_version__

0 commit comments

Comments
 (0)