diff options
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/__init__.pyi | 4 | ||||
| -rw-r--r-- | numpy/core/multiarray.pyi | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi index 001fa4e88..ec55596e6 100644 --- a/numpy/__init__.pyi +++ b/numpy/__init__.pyi @@ -934,6 +934,7 @@ _FlatIterSelf = TypeVar("_FlatIterSelf", bound=flatiter) @final class flatiter(Generic[_NdArraySubClass]): + __hash__: ClassVar[None] @property def base(self) -> _NdArraySubClass: ... @property @@ -1475,6 +1476,7 @@ class _SupportsImag(Protocol[_T_co]): def imag(self) -> _T_co: ... class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): + __hash__: ClassVar[None] @property def base(self) -> None | ndarray: ... @property @@ -3792,7 +3794,7 @@ class poly1d: @coefficients.setter def coefficients(self, value: NDArray[Any]) -> None: ... - __hash__: None # type: ignore + __hash__: ClassVar[None] # type: ignore @overload def __array__(self, t: None = ...) -> NDArray[Any]: ... diff --git a/numpy/core/multiarray.pyi b/numpy/core/multiarray.pyi index 1be582357..e943b110b 100644 --- a/numpy/core/multiarray.pyi +++ b/numpy/core/multiarray.pyi @@ -12,6 +12,7 @@ from typing import ( final, Final, Protocol, + ClassVar, ) from numpy import ( @@ -977,7 +978,7 @@ _SetItemKeys = L[ @final class flagsobj: - __hash__: None # type: ignore[assignment] + __hash__: ClassVar[None] # type: ignore[assignment] aligned: bool # NOTE: deprecated # updateifcopy: bool |
