@@ -706,16 +706,6 @@ class chararray(ndarray[_ShapeType, _DType_co]):
706706 def isnumeric (self ): ...
707707 def isdecimal (self ): ...
708708
709- class format_parser :
710- def __init__ (
711- self ,
712- formats : Any ,
713- names : Any ,
714- titles : Any ,
715- aligned : Any = ...,
716- byteorder : Any = ...,
717- ) -> None : ...
718-
719709class matrix (ndarray [_ShapeType , _DType_co ]):
720710 def __new__ (
721711 subtype ,
@@ -804,7 +794,6 @@ class nditer:
804794 def __setitem__ (self , index : SupportsIndex | slice , value : Any ) -> None : ...
805795 def __delitem__ (self , key : SupportsIndex | slice ) -> None : ...
806796
807-
808797class poly1d :
809798 def __init__ (
810799 self ,
@@ -863,33 +852,6 @@ class poly1d:
863852 def integ (self , m = ..., k = ...): ...
864853 def deriv (self , m = ...): ...
865854
866- class recarray (ndarray [_ShapeType , _DType_co ]):
867- def __new__ (
868- subtype ,
869- shape : Any ,
870- dtype : Any = ...,
871- buf : Any = ...,
872- offset : Any = ...,
873- strides : Any = ...,
874- formats : Any = ...,
875- names : Any = ...,
876- titles : Any = ...,
877- byteorder : Any = ...,
878- aligned : Any = ...,
879- order : Any = ...,
880- ) -> Any : ...
881- def __array_finalize__ (self , obj ): ...
882- def __getattribute__ (self , attr ): ...
883- def __setattr__ (self , attr , val ): ...
884- def __getitem__ (self , indx ): ...
885- def field (self , attr , val = ...): ...
886-
887- class record (void ):
888- def __getattribute__ (self , attr ): ...
889- def __setattr__ (self , attr , val ): ...
890- def __getitem__ (self , indx ): ...
891- def pprint (self ): ...
892-
893855class vectorize :
894856 pyfunc : Any
895857 cache : Any
@@ -3692,3 +3654,69 @@ class iinfo(Generic[_IntType]):
36923654 def __new__ (cls , dtype : int | Type [int ]) -> iinfo [int_ ]: ...
36933655 @overload
36943656 def __new__ (cls , dtype : str ) -> iinfo [Any ]: ...
3657+
3658+ class format_parser :
3659+ dtype : dtype [void ]
3660+ def __init__ (
3661+ self ,
3662+ formats : DTypeLike ,
3663+ names : None | str | Sequence [str ],
3664+ titles : None | str | Sequence [str ],
3665+ aligned : bool = ...,
3666+ byteorder : None | _ByteOrder = ...,
3667+ ) -> None : ...
3668+
3669+ # TODO: field-lookup returns either a `recarray` or a `ndarray`
3670+ # depending on the field dtype
3671+ class recarray (ndarray [_ShapeType , _DType_co ]):
3672+ # NOTE: While not strictly mandatory, we're demanding here that arguments
3673+ # for the `format_parser`- and `dtype`-based dtype constructors are
3674+ # mutually exclusive
3675+ @overload
3676+ def __new__ (
3677+ subtype ,
3678+ shape : _ShapeLike ,
3679+ dtype : None = ...,
3680+ buf : None | _SupportsBuffer = ...,
3681+ offset : SupportsIndex = ...,
3682+ strides : None | _ShapeLike = ...,
3683+ * ,
3684+ formats : DTypeLike ,
3685+ names : None | str | Sequence [str ] = ...,
3686+ titles : None | str | Sequence [str ] = ...,
3687+ byteorder : None | _ByteOrder = ...,
3688+ aligned : bool = ...,
3689+ order : _OrderKACF = ...,
3690+ ) -> recarray [Any , dtype [record ]]: ...
3691+ @overload
3692+ def __new__ (
3693+ subtype ,
3694+ shape : _ShapeLike ,
3695+ dtype : DTypeLike ,
3696+ buf : None | _SupportsBuffer = ...,
3697+ offset : SupportsIndex = ...,
3698+ strides : None | _ShapeLike = ...,
3699+ formats : None = ...,
3700+ names : None = ...,
3701+ titles : None = ...,
3702+ byteorder : None = ...,
3703+ aligned : L [False ] = ...,
3704+ order : _OrderKACF = ...,
3705+ ) -> recarray [Any , dtype [Any ]]: ...
3706+ def __array_finalize__ (self , obj : object ) -> None : ...
3707+ def __getattribute__ (self , attr : str ) -> Any : ...
3708+ def __setattr__ (self , attr : str , val : ArrayLike ) -> None : ...
3709+ def __getitem__ (self , indx ): ... # TODO
3710+ @overload
3711+ def field (self , attr : int | str , val : None = ...) -> Any : ...
3712+ @overload
3713+ def field (self , attr : int | str , val : ArrayLike ) -> None : ...
3714+
3715+ class record (void ):
3716+ def __getattribute__ (self , attr : str ) -> Any : ...
3717+ def __setattr__ (self , attr : str , val : ArrayLike ) -> None : ...
3718+ def pprint (self ) -> str : ...
3719+ @overload
3720+ def __getitem__ (self , key : str | SupportsIndex ) -> Any : ...
3721+ @overload
3722+ def __getitem__ (self , key : list [str ]) -> record : ...
0 commit comments