diff options
| author | Aaron Meurer <asmeurer@gmail.com> | 2021-11-14 14:35:06 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-14 22:35:06 +0100 |
| commit | a1813504ad44b70fb139181a9df8465bcb22e24d (patch) | |
| tree | 1c638079fe4e675976d73a0fb120f2f05d2ec522 /numpy/array_api/__init__.py | |
| parent | b8a0f339dcd90c134e1cc3e19d06348069af685b (diff) | |
| download | numpy-a1813504ad44b70fb139181a9df8465bcb22e24d.tar.gz | |
ENH: Add the linalg extension to the array_api submodule (#19980)
Diffstat (limited to 'numpy/array_api/__init__.py')
| -rw-r--r-- | numpy/array_api/__init__.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/numpy/array_api/__init__.py b/numpy/array_api/__init__.py index 36e3f3ed5..bbe2fdce2 100644 --- a/numpy/array_api/__init__.py +++ b/numpy/array_api/__init__.py @@ -109,9 +109,6 @@ Still TODO in this module are: - The spec is still in an RFC phase and may still have minor updates, which will need to be reflected here. -- The linear algebra extension in the spec will be added in a future pull - request. - - Complex number support in array API spec is planned but not yet finalized, as are the fft extension and certain linear algebra functions such as eig that require complex dtypes. @@ -334,12 +331,13 @@ __all__ += [ "trunc", ] -# einsum is not yet implemented in the array API spec. +# linalg is an extension in the array API spec, which is a sub-namespace. Only +# a subset of functions in it are imported into the top-level namespace. +from . import linalg -# from ._linear_algebra_functions import einsum -# __all__ += ['einsum'] +__all__ += ["linalg"] -from ._linear_algebra_functions import matmul, tensordot, matrix_transpose, vecdot +from .linalg import matmul, tensordot, matrix_transpose, vecdot __all__ += ["matmul", "tensordot", "matrix_transpose", "vecdot"] |
