@@ -190,7 +190,9 @@ __all__ = [
190190 "zeros_like" ,
191191]
192192
193+ _ShapeType = TypeVar ("_ShapeType" , bound = tuple [int , ...])
193194_ShapeType_co = TypeVar ("_ShapeType_co" , bound = tuple [int , ...], covariant = True )
195+ _DType = TypeVar ("_DType" , bound = dtype [Any ])
194196_DType_co = TypeVar ("_DType_co" , bound = dtype [Any ], covariant = True )
195197
196198MaskType = bool
@@ -347,13 +349,13 @@ class MaskedArray(ndarray[_ShapeType_co, _DType_co]):
347349 def __getitem__ (self , indx ): ...
348350 def __setitem__ (self , indx , value ): ...
349351 @property
350- def dtype (self ): ...
352+ def dtype (self ) -> _DType_co : ...
351353 @dtype .setter
352- def dtype (self , dtype ) : ...
354+ def dtype (self : MaskedArray [ _ShapeType_co , _DType ], dtype : _DType ) -> None : ...
353355 @property
354- def shape (self ): ...
356+ def shape (self ) -> _ShapeType_co : ...
355357 @shape .setter
356- def shape (self , shape ) : ...
358+ def shape (self : MaskedArray [ _ShapeType , _DType_co ], shape : _ShapeType ) -> None : ...
357359 def __setmask__ (self , mask , copy = ...): ...
358360 @property
359361 def mask (self ): ...
@@ -413,8 +415,8 @@ class MaskedArray(ndarray[_ShapeType_co, _DType_co]):
413415 def __ifloordiv__ (self , other ): ...
414416 def __itruediv__ (self , other ): ...
415417 def __ipow__ (self , other ): ...
416- def __float__ (self ): ...
417- def __int__ (self ): ...
418+ def __float__ (self ) -> float : ...
419+ def __int__ (self ) -> int : ...
418420 @property # type: ignore[misc]
419421 def imag (self ): ...
420422 get_imag : Any
0 commit comments