/
githubmirror
/
scikit-learn
Обзор
Документация
Войти
/
githubmirror
/
scikit-learn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
sklearn/externals/array_api_compat/numpy/__init__.py
37 строк
1 KB
Lucas Colley
MNT: bump to array API 2025.12, array-api-compat 1.15, array-api-extra 0.10.3 (#34231)
11 июн 2026, 17:53
Не верифицирован
11 июн 2026, 17:53
2b91769
Код
Авторство
О чём код?
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__(__spec__.parent + ".linalg") __import__(__spec__.parent + ".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__