Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/numpy-stubs/@test/static/reject/ma.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 3 additions & 1 deletion src/numpy-stubs/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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: ...

#
Expand Down