8000 TYP: Type masked array shape, dtype, __int__, and __float__ by MarcoGorelli · Pull Request #28591 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

TYP: Type masked array shape, dtype, __int__, and __float__ #28591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 27, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Apply suggestions from code review
Co-authored-by: Joren Hammudoglu <jhammudoglu@gmail.com>
  • Loading branch information
MarcoGorelli and jorenham authored Mar 27, 2025
commit f9d311a28b1fcb01125c768b533f4f6734ef976d
2 changes: 1 addition & 1 deletion numpy/ma/core.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ class MaskedArray(ndarray[_ShapeType_co, _DType_co]):
@property
def shape(self) -> _ShapeType_co: ...
@shape.setter
def shape(self: MaskedArray[_ShapeType, _DType_co], shape: _ShapeType, /,) -> None: ...
def shape(self: MaskedArray[_ShapeType, Any], shape: _ShapeType, /) -> None: ...
def __setmask__(self, mask, copy=...): ...
@property
def mask(self): ...
Expand Down
2 changes: 0 additions & 2 deletions numpy/typing/tests/data/reveal/ma.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import numpy as np
from typing_extensions import assert_type


m: np.ma.MaskedArray[tuple[int], np.dtype[np.float64]]

assert_type(m.shape, tuple[int])
Expand Down
Loading
0