diff options
-rw-r--r-- | numpy/__init__.pyi | 7 | ||||
-rw-r--r-- | numpy/core/_ufunc_config.pyi | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi index 2eb4a0634..31e84f016 100644 --- a/numpy/__init__.pyi +++ b/numpy/__init__.pyi @@ -9,6 +9,7 @@ import enum from abc import abstractmethod from types import TracebackType, MappingProxyType from contextlib import ContextDecorator +from contextlib import contextmanager if sys.version_info >= (3, 9): from types import GenericAlias @@ -180,6 +181,7 @@ from collections.abc import ( from typing import ( Literal as L, Any, + Generator, Generic, IO, NoReturn, @@ -3351,6 +3353,11 @@ class errstate(Generic[_CallType], ContextDecorator): /, ) -> None: ... +@contextmanager +def no_nep50_warning() -> Generator[None, None, None]: ... +def get_promotion_state() -> str: ... +def set_promotion_state(state: str, /) -> None: ... + class ndenumerate(Generic[_ScalarType]): iter: flatiter[NDArray[_ScalarType]] @overload diff --git a/numpy/core/_ufunc_config.pyi b/numpy/core/_ufunc_config.pyi index b7c2ebefc..76177f6b3 100644 --- a/numpy/core/_ufunc_config.pyi +++ b/numpy/core/_ufunc_config.pyi @@ -34,4 +34,4 @@ def seterrcall( ) -> None | _ErrFunc | _SupportsWrite[str]: ... def geterrcall() -> None | _ErrFunc | _SupportsWrite[str]: ... -# See `numpy/__init__.pyi` for the `errstate` class +# See `numpy/__init__.pyi` for the `errstate` class and `no_nep5_warnings`
\ No newline at end of file |