@@ -16,7 +16,7 @@ __all__ = ["asmatrix", "bmat", "matrix"]
1616_T = TypeVar ("_T" )
1717_ArrayT = TypeVar ("_ArrayT" , bound = _nt .Array )
1818_ScalarT = TypeVar ("_ScalarT" , bound = np .generic )
19- _ShapeT_co = TypeVar ("_ShapeT_co" , bound = _nt .Shape2 , default = _nt .Shape2 , covariant = True )
19+ _ShapeT_co = TypeVar ("_ShapeT_co" , bound = _nt .Shape2 , default = _nt .Rank2 , covariant = True )
2020_DTypeT_co = TypeVar ("_DTypeT_co" , bound = np .dtype , default = np .dtype , covariant = True )
2121
2222_ToIndex1 : TypeAlias = slice | EllipsisType | _nt .ToInteger_1nd | None
@@ -38,9 +38,9 @@ class matrix(np.ndarray[_ShapeT_co, _DTypeT_co]):
3838 @overload
3939 def __getitem__ (self , key : _ToIndex1 | _ToIndex2 , / ) -> matrix [_nt .Rank2 , _DTypeT_co ]: ...
4040 @overload
41- def __getitem__ (self : _nt .Array [np .void ], key : str , / ) -> matrix [ _ShapeT_co , np . dtype ] : ...
41+ def __getitem__ (self : _nt .Array [np .void ], key : str , / ) -> _nt . Matrix : ...
4242 @overload
43- def __getitem__ (self : _nt .Array [np .void ], key : list [str ], / ) -> matrix [ _ShapeT_co , np . dtype [np .void ] ]: ... # pyright: ignore[reportIncompatibleMethodOverride]
43+ def __getitem__ (self : _nt .Array [np .void ], key : list [str ], / ) -> _nt . Matrix [np .void ]: ... # pyright: ignore[reportIncompatibleMethodOverride]
4444
4545 #
4646 @override
0 commit comments