diff --git a/CHANGELOG.md b/CHANGELOG.md index c7333b3..a976b29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added * Added `patch_numpy_umath` and `restore_numpy_umath` functions for patching NumPy, and improved the patching implementation [gh-170](https://github.com/IntelPython/mkl_umath/pull/170) +### Changed +* Import ufuncs explicitly in `__init__.py` and add `__all__` to module [gh-177](https://github.com/IntelPython/mkl_umath/pull/177) + ### Fixed * Build with ICX compiler from 2026.0 release [gh-155](https://github.com/IntelPython/mkl_umath/pull/155) * `mkl_umath` now uses `intel_thread` for MKL threading to fix transient crashes during Python teardown when used in an environment with PyPI NumPy [gh-171](https://github.com/IntelPython/mkl_umath/pull/171) diff --git a/mkl_umath/__init__.py b/mkl_umath/__init__.py index d060399..71b50b1 100644 --- a/mkl_umath/__init__.py +++ b/mkl_umath/__init__.py @@ -37,9 +37,133 @@ restore_numpy_umath, use_in_numpy, ) -from ._ufuncs import * +from ._ufuncs import ( + absolute, + add, + arccos, + arccosh, + arcsin, + arcsinh, + arctan, + arctanh, + cbrt, + ceil, + conjugate, + copysign, + cos, + cosh, + divide, + equal, + exp, + exp2, + expm1, + fabs, + floor, + fmax, + fmin, + frexp, + greater, + greater_equal, + isfinite, + isinf, + isnan, + ldexp, + less, + less_equal, + log, + log1p, + log2, + log10, + logical_and, + logical_not, + logical_or, + logical_xor, + modf, + multiply, + negative, + nextafter, + not_equal, + positive, + reciprocal, + rint, + sign, + sin, + sinh, + spacing, + sqrt, + square, + subtract, + tan, + tanh, + trunc, +) from ._version import __version__ -# TODO: add __all__ with public API and remove star imports +__all__ = [ + "absolute", + "add", + "arccos", + "arccosh", + "arcsin", + "arcsinh", + "arctan", + "arctanh", + "cbrt", + "ceil", + "conjugate", + "copysign", + "cos", + "cosh", + "divide", + "equal", + "exp", + "exp2", + "expm1", + "fabs", + "floor", + "fmax", + "fmin", + "frexp", + "greater", + "greater_equal", + "isfinite", + "isinf", + "isnan", + "ldexp", + "less", + "less_equal", + "log", + "log10", + "log1p", + "log2", + "logical_and", + "logical_not", + "logical_or", + "logical_xor", + "modf", + "multiply", + "negative", + "nextafter", + "not_equal", + "positive", + "reciprocal", + "rint", + "sign", + "sin", + "sinh", + "spacing", + "sqrt", + "square", + "subtract", + "tan", + "tanh", + "trunc", + "is_patched", + "mkl_umath", + "patch_numpy_umath", + "restore", + "restore_numpy_umath", + "use_in_numpy", +] del _init_helper