diff --git a/src/numpy-stubs/@test/static/reject/ma.pyi b/src/numpy-stubs/@test/static/reject/ma.pyi index def80bbf..3e95b18c 100644 --- a/src/numpy-stubs/@test/static/reject/ma.pyi +++ b/src/numpy-stubs/@test/static/reject/ma.pyi @@ -2,7 +2,7 @@ import numpy as np m: np.ma.MaskedArray[tuple[int], np.dtype[np.float64]] -m.shape = (3, 1) # type: ignore[arg-type, assignment] +m.shape = (3, 1) # type: ignore[arg-type, assignment] # pyright: ignore[reportDeprecated] m.dtype = np.bool # type: ignore[assignment, misc] # pyright: ignore[reportAttributeAccessIssue] np.amin(m, axis=1.0) # type: ignore[call-overload] # pyright: ignore[reportArgumentType, reportCallIssue] diff --git a/src/numpy-stubs/__init__.pyi b/src/numpy-stubs/__init__.pyi index 8708379f..1bbc4627 100644 --- a/src/numpy-stubs/__init__.pyi +++ b/src/numpy-stubs/__init__.pyi @@ -27,7 +27,7 @@ from typing import ( overload, type_check_only, ) -from typing_extensions import Buffer, CapsuleType, Protocol, TypeVar, override +from typing_extensions import Buffer, CapsuleType, Protocol, TypeVar, deprecated, override import _numtype as _nt @@ -1718,12 +1718,14 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]): # def shape(self: _nt.HasInnerShape[_ShapeT] | ndarray[_ShapeT2]) -> _ShapeT | _ShapeT2: ... # noqa: ERA001 def shape(self: ndarray[_AnyShapeT]) -> _AnyShapeT: ... @shape.setter + @deprecated("In-place shape modification will be deprecated in NumPy 2.5.", category=PendingDeprecationWarning) def shape(self: _nt.HasInnerShape[_ShapeT] | ndarray[_ShapeT2], shape: _ShapeT | _ShapeT2, /) -> None: ... # @property def strides(self) -> tuple[int, ...]: ... @strides.setter + @deprecated("Setting the strides on a NumPy array has been deprecated in NumPy 2.4") def strides(self, value: tuple[int, ...], /) -> None: ... #