-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy path__init__.py
More file actions
38 lines (28 loc) · 1.04 KB
/
__init__.py
File metadata and controls
38 lines (28 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# ruff: noqa: PLC0414
from typing import Final
from .._internal import clone_module
# This needs to be loaded explicitly before cloning
import numpy.typing # noqa: F401
__all__ = clone_module("numpy", globals())
# These imports may overwrite names from the import * above.
from . import _aliases
from ._aliases import * # type: ignore[assignment,no-redef] # noqa: F403
from ._info import __array_namespace_info__ # noqa: F401
# Don't know why, but we have to do an absolute import to import linalg. If we
# instead do
#
# from . import linalg
#
# It doesn't overwrite np.linalg from above. The import is generated
# dynamically so that the library can be vendored.
__import__(__package__ + ".linalg")
__import__(__package__ + ".fft")
from .linalg import matrix_transpose, vecdot # type: ignore[no-redef] # noqa: F401
__array_api_version__: Final = "2025.12"
__all__ = sorted(
set(__all__)
| set(_aliases.__all__)
| {"__array_api_version__", "__array_namespace_info__", "linalg", "fft"}
)
def __dir__() -> list[str]:
return __all__