@@ -16,7 +16,7 @@ __all__ = ["asmatrix", "bmat", "matrix"]
16
16
_T = TypeVar ("_T" )
17
17
_ArrayT = TypeVar ("_ArrayT" , bound = _nt .Array )
18
18
_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 )
20
20
_DTypeT_co = TypeVar ("_DTypeT_co" , bound = np .dtype , default = np .dtype , covariant = True )
21
21
22
22
_ToIndex1 : TypeAlias = slice | EllipsisType | _nt .ToInteger_1nd | None
@@ -38,9 +38,9 @@ class matrix(np.ndarray[_ShapeT_co, _DTypeT_co]):
38
38
@overload
39
39
def __getitem__ (self , key : _ToIndex1 | _ToIndex2 , / ) -> matrix [_nt .Rank2 , _DTypeT_co ]: ...
40
40
@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 : ...
42
42
@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]
44
44
45
45
#
46
46
@override
0 commit comments