<
8000
path d="M7.823 1.677 4.927 4.573A.25.25 0 0 0 5.104 5H7.25v3.236a.75.75 0 1 0 1.5 0V5h2.146a.25.25 0 0 0 .177-.427L8.177 1.677a.25.25 0 0 0-.354 0ZM13.75 11a.75.75 0 0 0 0 1.5h.5a.75.75 0 0 0 0-1.5h-.5Zm-3.75.75a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75ZM7.75 11a.75.75 0 0 0 0 1.5h.5a.75.75 0 0 0 0-1.5h-.5ZM4 11.75a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75ZM1.75 11a.75.75 0 0 0 0 1.5h.5a.75.75 0 0 0 0-1.5h-.5Z"> @@ -2,13 +2,14 @@
2
2
# ruff: noqa: ANN001, ANN002, ANN003, ANN201, ANN202 ANN204, ANN401
3
3
4
4
from collections .abc import Sequence
5
- from typing import Any , Literal , SupportsIndex , TypeAlias , TypeVar , overload
5
+ from typing import Any , Literal , Self , SupportsIndex , TypeAlias , TypeVar , overload
6
6
7
7
from _typeshed import Incomplete
8
8
from typing_extensions import TypeIs , deprecated
9
9
10
10
import numpy as np
11
11
from numpy import (
12
+ _HasDTypeWithRealAndImag ,
12
13
_ModeKind ,
13
14
_OrderKACF ,
14
15
_PartitionKind ,
@@ -401,10 +402,6 @@ class MaskedArray(ndarray[_ShapeT_co, _DTypeT_co]):
401
402
def __getitem__ (self , indx ): ...
402
403
def __setitem__ (self , indx , value ): ...
403
404
@property
404
- def dtype (self ) -> _DTypeT_co : ...
405
- @dtype .setter
406
- def dtype (self : MaskedArray [Any , _DTypeT ], dtype : _DTypeT , / ) -> None : ...
407
- @property
408
405
def shape (self ) -> _ShapeT_co : ...
409
406
@shape .setter
410
407
def shape (self : MaskedArray [_ShapeT , Any ], shape : _ShapeT , / ) -> None : ...
@@ -426,7 +423,7 @@ class MaskedArray(ndarray[_ShapeT_co, _DTypeT_co]):
426
423
def sharedmask (self ): ...
427
424
def shrink_mask (self ): ...
428
425
@property
429
- def baseclass (self ): ...
426
+ def baseclass (self ) -> type [ NDArray [ Any ]] : ...
430
427
data : Any
431
428
@property
432
429
def flat (self ): ...
@@ -468,10 +465,10 @@ class MaskedArray(ndarray[_ShapeT_co, _DTypeT_co]):
468
465
def __itruediv__ (self , other ): ...
469
466
def __ipow__ (self , other ): ...
470
467
@property # type: ignore[misc]
471
- def imag (self ) : ...
468
+ def imag (self : _HasDTypeWithRealAndImag [ object , _ScalarT ], / ) -> MaskedArray [ _ShapeT_co , dtype [ _ScalarT ]] : ...
472
469
get_imag : Any
473
470
@property # type: ignore[misc]
474
- def real (self ) : ...
471
+ def real (self : _HasDTypeWithRealAndImag [ _ScalarT , object ], / ) -> MaskedArray [ _ShapeT_co , dtype [ _ScalarT ]] : ...
475
472
get_real : Any
476
473
477
474
# keep in sync with `np.ma.count`
@@ -804,9 +801,6 @@ class MaskedArray(ndarray[_ShapeT_co, _DTypeT_co]):
804
801
T : Any
805
802
transpose : Any
806
803
807
- @property # type: ignore[misc]
808
- def mT (self ): ...
809
-
810
804
#
811
805
def toflex (self ) -> Incomplete : ...
812
806
def torecords (self ) -> Incomplete : ...
@@ -820,6 +814,12 @@ class MaskedArray(ndarray[_ShapeT_co, _DTypeT_co]):
820
814
def __reduce__ (self ): ...
821
815
def __deepcopy__ (self , memo = ...): ...
822
816
817
+ # Keep `dtype` at the bottom to avoid name conflicts with `np.dtype`
818
+ @property
819
+ def dtype (self ) -> _DTypeT_co : ...
820
<
8000
code class="diff-text syntax-highlighted-line addition">+ @dtype .setter
821
+ def dtype (self : MaskedArray [Any , _DTypeT ], dtype : _DTypeT , / ) -> None : ...
822
+
823
823
class mvoid (MaskedArray [_ShapeT_co , _DTypeT_co ]):
824
824
def __new__ (
825
825
self , # pyright: ignore[reportSelfClsParameterName]
0 commit comments