Skip to content

Commit 0e05de4

Browse files
committed
TYP: Stop using Any as shape-type default
1 parent 8420a7e commit 0e05de4

18 files changed

+192
-177
lines changed

numpy/__init__.pyi

Lines changed: 52 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,9 +1376,9 @@ class flatiter(Generic[_NdArraySubClass_co]):
13761376
@overload
13771377
def __array__(self: flatiter[ndarray[_FlatShapeType, Any]], dtype: _DType, /) -> ndarray[_FlatShapeType, _DType]: ...
13781378
@overload
1379-
def __array__(self: flatiter[ndarray[Any, _DType]], dtype: None = ..., /) -> ndarray[Any, _DType]: ...
1379+
def __array__(self: flatiter[ndarray[_Shape, _DType]], dtype: None = ..., /) -> ndarray[_Shape, _DType]: ...
13801380
@overload
1381-
def __array__(self, dtype: _DType, /) -> ndarray[Any, _DType]: ...
1381+
def __array__(self, dtype: _DType, /) -> ndarray[_Shape, _DType]: ...
13821382

13831383
_OrderKACF: TypeAlias = L[None, "K", "A", "C", "F"]
13841384
_OrderACF: TypeAlias = L[None, "A", "C", "F"]
@@ -1831,11 +1831,15 @@ _DType = TypeVar("_DType", bound=dtype[Any])
18311831
_DType_co = TypeVar("_DType_co", covariant=True, bound=dtype[Any])
18321832
_FlexDType = TypeVar("_FlexDType", bound=dtype[flexible])
18331833

1834-
_ShapeType_co = TypeVar("_ShapeType_co", covariant=True, bound=tuple[int, ...])
1835-
_ShapeType2 = TypeVar("_ShapeType2", bound=tuple[int, ...])
1836-
_Shape2DType_co = TypeVar("_Shape2DType_co", covariant=True, bound=tuple[int, int])
1834+
_Shape1D: TypeAlias = tuple[int]
1835+
_Shape2D: TypeAlias = tuple[int, int]
1836+
1837+
_ShapeType_co = TypeVar("_ShapeType_co", covariant=True, bound=_Shape)
1838+
_ShapeType2 = TypeVar("_ShapeType2", bound=_Shape)
1839+
_Shape2DType_co = TypeVar("_Shape2DType_co", covariant=True, bound=_Shape2D)
18371840
_NumberType = TypeVar("_NumberType", bound=number[Any])
18381841

1842+
18391843
if sys.version_info >= (3, 12):
18401844
from collections.abc import Buffer as _SupportsBuffer
18411845
else:
@@ -1961,7 +1965,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType_co, _DType_co]):
19611965
NDArray[integer[Any]]
19621966
| NDArray[np.bool]
19631967
| tuple[NDArray[integer[Any]] | NDArray[np.bool], ...]
1964-
)) -> ndarray[Any, _DType_co]: ...
1968+
)) -> ndarray[_Shape, _DType_co]: ...
19651969
@overload
19661970
def __getitem__(self, key: SupportsIndex | tuple[SupportsIndex, ...]) -> Any: ...
19671971
@overload
@@ -1972,7 +1976,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType_co, _DType_co]):
19721976
| SupportsIndex
19731977
| _ArrayLikeInt_co
19741978
| tuple[None | slice | EllipsisType | _ArrayLikeInt_co | SupportsIndex, ...]
1975-
)) -> ndarray[Any, _DType_co]: ...
1979+
)) -> ndarray[_Shape, _DType_co]: ...
19761980
@overload
19771981
def __getitem__(self: NDArray[void], key: str) -> NDArray[Any]: ...
19781982
@overload
@@ -2018,13 +2022,13 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType_co, _DType_co]):
20182022
def squeeze(
20192023
self,
20202024
axis: None | SupportsIndex | tuple[SupportsIndex, ...] = ...,
2021-
) -> ndarray[Any, _DType_co]: ...
2025+
) -> ndarray[_Shape, _DType_co]: ...
20222026

20232027
def swapaxes(
20242028
self,
20252029
axis1: SupportsIndex,
20262030
axis2: SupportsIndex,
2027-
) -> ndarray[Any, _DType_co]: ...
2031+
) -> ndarray[_Shape, _DType_co]: ...
20282032

20292033
@overload
20302034
def transpose(self: _ArraySelf, axes: None | _ShapeLike, /) -> _ArraySelf: ...
@@ -2044,7 +2048,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType_co, _DType_co]):
20442048
offset: SupportsIndex = ...,
20452049
axis1: SupportsIndex = ...,
20462050
axis2: SupportsIndex = ...,
2047-
) -> ndarray[Any, _DType_co]: ...
2051+
) -> ndarray[_Shape, _DType_co]: ...
20482052

20492053
# 1D + 1D returns a scalar;
20502054
# all other with at least 1 non-0D array return an ndarray.
@@ -2140,7 +2144,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType_co, _DType_co]):
21402144
axis: None | SupportsIndex = ...,
21412145
out: None = ...,
21422146
mode: _ModeKind = ...,
2143-
) -> ndarray[Any, _DType_co]: ...
2147+
) -> ndarray[_Shape, _DType_co]: ...
21442148
@overload
21452149
def take(
21462150
self,
@@ -2154,19 +2158,19 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType_co, _DType_co]):
21542158
self,
21552159
repeats: _ArrayLikeInt_co,
21562160
axis: None | SupportsIndex = ...,
2157-
) -> ndarray[Any, _DType_co]: ...
2161+
) -> ndarray[_Shape, _DType_co]: ...
21582162

21592163
# TODO: use `tuple[int]` as shape type once covariant (#26081)
21602164
def flatten(
21612165
self,
21622166
order: _OrderKACF = ...,
2163-
) -> ndarray[Any, _DType_co]: ...
2167+
) -> ndarray[_Shape, _DType_co]: ...
21642168

21652169
# TODO: use `tuple[int]` as shape type once covariant (#26081)
21662170
def ravel(
21672171
self,
21682172
order: _OrderKACF = ...,
2169-
) -> ndarray[Any, _DType_co]: ...
2173+
) -> ndarray[_Shape, _DType_co]: ...
21702174

21712175
@overload
21722176
def reshape(
@@ -2176,14 +2180,14 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType_co, _DType_co]):
21762180
*,
21772181
order: _OrderACF = ...,
21782182
copy: None | bool = ...,
2179-
) -> ndarray[Any, _DType_co]: ...
2183+
) -> ndarray[_Shape, _DType_co]: ...
21802184
@overload
21812185
def reshape(
21822186
self,
21832187
*shape: SupportsIndex,
21842188
order: _OrderACF = ...,
21852189
copy: None | bool = ...,
2186-
) -> ndarray[Any, _DType_co]: ...
2190+
) -> ndarray[_Shape, _DType_co]: ...
21872191

21882192
@overload
21892193
def astype(
@@ -3069,7 +3073,7 @@ class generic(_ArrayOrScalarCommon):
30693073
@overload
30703074
def __array__(self: _ScalarType, dtype: None = ..., /) -> NDArray[_ScalarType]: ...
30713075
@overload
3072-
def __array__(self, dtype: _DType, /) -> ndarray[Any, _DType]: ...
3076+
def __array__(self, dtype: _DType, /) -> ndarray[_Shape, _DType]: ...
30733077
def __hash__(self) -> int: ...
30743078
@property
30753079
def base(self) -> None: ...
@@ -4247,7 +4251,7 @@ class poly1d:
42474251
@overload
42484252
def __array__(self, t: None = ..., copy: None | bool = ...) -> NDArray[Any]: ...
42494253
@overload
4250-
def __array__(self, t: _DType, copy: None | bool = ...) -> ndarray[Any, _DType]: ...
4254+
def __array__(self, t: _DType, copy: None | bool = ...) -> ndarray[_Shape, _DType]: ...
42514255

42524256
@overload
42534257
def __call__(self, val: _ScalarLike_co) -> Any: ...
@@ -4287,15 +4291,14 @@ class poly1d:
42874291
) -> poly1d: ...
42884292

42894293

4290-
42914294
class matrix(ndarray[_Shape2DType_co, _DType_co]):
42924295
__array_priority__: ClassVar[float]
42934296
def __new__(
42944297
subtype,
42954298
data: ArrayLike,
42964299
dtype: DTypeLike = ...,
42974300
copy: builtins.bool = ...,
4298-
) -> matrix[Any, Any]: ...
4301+
) -> matrix[_Shape2D, Any]: ...
42994302
def __array_finalize__(self, obj: object) -> None: ...
43004303

43014304
@overload
@@ -4320,122 +4323,122 @@ class matrix(ndarray[_Shape2DType_co, _DType_co]):
43204323
| tuple[None | slice | EllipsisType | _ArrayLikeInt_co | SupportsIndex, ...]
43214324
),
43224325
/,
4323-
) -> matrix[Any, _DType_co]: ...
4326+
) -> matrix[_Shape2D, _DType_co]: ...
43244327
@overload
4325-
def __getitem__(self: NDArray[void], key: str, /) -> matrix[Any, dtype[Any]]: ...
4328+
def __getitem__(self: NDArray[void], key: str, /) -> matrix[_Shape2D, dtype[Any]]: ...
43264329
@overload
43274330
def __getitem__(self: NDArray[void], key: list[str], /) -> matrix[_Shape2DType_co, dtype[void]]: ...
43284331

4329-
def __mul__(self, other: ArrayLike, /) -> matrix[Any, Any]: ...
4330-
def __rmul__(self, other: ArrayLike, /) -> matrix[Any, Any]: ...
4332+
def __mul__(self, other: ArrayLike, /) -> matrix[_Shape2D, Any]: ...
4333+
def __rmul__(self, other: ArrayLike, /) -> matrix[_Shape2D, Any]: ...
43314334
def __imul__(self, other: ArrayLike, /) -> matrix[_Shape2DType_co, _DType_co]: ...
4332-
def __pow__(self, other: ArrayLike, /) -> matrix[Any, Any]: ...
4335+
def __pow__(self, other: ArrayLike, /) -> matrix[_Shape2D, Any]: ...
43334336
def __ipow__(self, other: ArrayLike, /) -> matrix[_Shape2DType_co, _DType_co]: ...
43344337

43354338
@overload
43364339
def sum(self, axis: None = ..., dtype: DTypeLike = ..., out: None = ...) -> Any: ...
43374340
@overload
4338-
def sum(self, axis: _ShapeLike, dtype: DTypeLike = ..., out: None = ...) -> matrix[Any, Any]: ...
4341+
def sum(self, axis: _ShapeLike, dtype: DTypeLike = ..., out: None = ...) -> matrix[_Shape2D, Any]: ...
43394342
@overload
43404343
def sum(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: ...
43414344

43424345
@overload
43434346
def mean(self, axis: None = ..., dtype: DTypeLike = ..., out: None = ...) -> Any: ...
43444347
@overload
4345-
def mean(self, axis: _ShapeLike, dtype: DTypeLike = ..., out: None = ...) -> matrix[Any, Any]: ...
4348+
def mean(self, axis: _ShapeLike, dtype: DTypeLike = ..., out: None = ...) -> matrix[_Shape2D, Any]: ...
43464349
@overload
43474350
def mean(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: ...
43484351

43494352
@overload
43504353
def std(self, axis: None = ..., dtype: DTypeLike = ..., out: None = ..., ddof: float = ...) -> Any: ...
43514354
@overload
4352-
def std(self, axis: _ShapeLike, dtype: DTypeLike = ..., out: None = ..., ddof: float = ...) -> matrix[Any, Any]: ...
4355+
def std(self, axis: _ShapeLike, dtype: DTypeLike = ..., out: None = ..., ddof: float = ...) -> matrix[_Shape2D, Any]: ...
43534356
@overload
43544357
def std(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ..., ddof: float = ...) -> _NdArraySubClass: ...
43554358

43564359
@overload
43574360
def var(self, axis: None = ..., dtype: DTypeLike = ..., out: None = ..., ddof: float = ...) -> Any: ...
43584361
@overload
4359-
def var(self, axis: _ShapeLike, dtype: DTypeLike = ..., out: None = ..., ddof: float = ...) -> matrix[Any, Any]: ...
4362+
def var(self, axis: _ShapeLike, dtype: DTypeLike = ..., out: None = ..., ddof: float = ...) -> matrix[_Shape2D, Any]: ...
43604363
@overload
43614364
def var(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ..., ddof: float = ...) -> _NdArraySubClass: ...
43624365

43634366
@overload
43644367
def prod(self, axis: None = ..., dtype: DTypeLike = ..., out: None = ...) -> Any: ...
43654368
@overload
4366-
def prod(self, axis: _ShapeLike, dtype: DTypeLike = ..., out: None = ...) -> matrix[Any, Any]: ...
4369+
def prod(self, axis: _ShapeLike, dtype: DTypeLike = ..., out: None = ...) -> matrix[_Shape2D, Any]: ...
43674370
@overload
43684371
def prod(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: ...
43694372

43704373
@overload
43714374
def any(self, axis: None = ..., out: None = ...) -> np.bool: ...
43724375
@overload
4373-
def any(self, axis: _ShapeLike, out: None = ...) -> matrix[Any, dtype[np.bool]]: ...
4376+
def any(self, axis: _ShapeLike, out: None = ...) -> matrix[_Shape2D, dtype[np.bool]]: ...
43744377
@overload
43754378
def any(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: ...
43764379

43774380
@overload
43784381
def all(self, axis: None = ..., out: None = ...) -> np.bool: ...
43794382
@overload
4380-
def all(self, axis: _ShapeLike, out: None = ...) -> matrix[Any, dtype[np.bool]]: ...
4383+
def all(self, axis: _ShapeLike, out: None = ...) -> matrix[_Shape2D, dtype[np.bool]]: ...
43814384
@overload
43824385
def all(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: ...
43834386

43844387
@overload
43854388
def max(self: NDArray[_ScalarType], axis: None = ..., out: None = ...) -> _ScalarType: ...
43864389
@overload
4387-
def max(self, axis: _ShapeLike, out: None = ...) -> matrix[Any, _DType_co]: ...
4390+
def max(self, axis: _ShapeLike, out: None = ...) -> matrix[_Shape2D, _DType_co]: ...
43884391
@overload
43894392
def max(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: ...
43904393

43914394
@overload
43924395
def min(self: NDArray[_ScalarType], axis: None = ..., out: None = ...) -> _ScalarType: ...
43934396
@overload
4394-
def min(self, axis: _ShapeLike, out: None = ...) -> matrix[Any, _DType_co]: ...
4397+
def min(self, axis: _ShapeLike, out: None = ...) -> matrix[_Shape2D, _DType_co]: ...
43954398
@overload
43964399
def min(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: ...
43974400

43984401
@overload
43994402
def argmax(self: NDArray[_ScalarType], axis: None = ..., out: None = ...) -> intp: ...
44004403
@overload
4401-
def argmax(self, axis: _ShapeLike, out: None = ...) -> matrix[Any, dtype[intp]]: ...
4404+
def argmax(self, axis: _ShapeLike, out: None = ...) -> matrix[_Shape2D, dtype[intp]]: ...
44024405
@overload
44034406
def argmax(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: ...
44044407

44054408
@overload
44064409
def argmin(self: NDArray[_ScalarType], axis: None = ..., out: None = ...) -> intp: ...
44074410
@overload
4408-
def argmin(self, axis: _ShapeLike, out: None = ...) -> matrix[Any, dtype[intp]]: ...
4411+
def argmin(self, axis: _ShapeLike, out: None = ...) -> matrix[_Shape2D, dtype[intp]]: ...
44094412
@overload
44104413
def argmin(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: ...
44114414

44124415
@overload
44134416
def ptp(self: NDArray[_ScalarType], axis: None = ..., out: None = ...) -> _ScalarType: ...
44144417
@overload
4415-
def ptp(self, axis: _ShapeLike, out: None = ...) -> matrix[Any, _DType_co]: ...
4418+
def ptp(self, axis: _ShapeLike, out: None = ...) -> matrix[_Shape2D, _DType_co]: ...
44164419
@overload
44174420
def ptp(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: ...
44184421

4419-
def squeeze(self, axis: None | _ShapeLike = ...) -> matrix[Any, _DType_co]: ...
4420-
def tolist(self: matrix[Any, dtype[_SupportsItem[_T]]]) -> list[list[_T]]: ... # type: ignore[typevar]
4421-
def ravel(self, order: _OrderKACF = ...) -> matrix[Any, _DType_co]: ...
4422-
def flatten(self, order: _OrderKACF = ...) -> matrix[Any, _DType_co]: ...
4422+
def squeeze(self, axis: None | _ShapeLike = ...) -> matrix[_Shape2D, _DType_co]: ...
4423+
def tolist(self: matrix[_Shape2D, dtype[_SupportsItem[_T]]]) -> list[list[_T]]: ... # type: ignore[typevar]
4424+
def ravel(self, order: _OrderKACF = ...) -> matrix[_Shape2D, _DType_co]: ...
4425+
def flatten(self, order: _OrderKACF = ...) -> matrix[_Shape2D, _DType_co]: ...
44234426

44244427
@property
4425-
def T(self) -> matrix[Any, _DType_co]: ...
4428+
def T(self) -> matrix[_Shape2D, _DType_co]: ...
44264429
@property
4427-
def I(self) -> matrix[Any, Any]: ...
4430+
def I(self) -> matrix[_Shape2D, Any]: ...
44284431
@property
44294432
def A(self) -> ndarray[_Shape2DType_co, _DType_co]: ...
44304433
@property
4431-
def A1(self) -> ndarray[Any, _DType_co]: ...
4434+
def A1(self) -> ndarray[_Shape, _DType_co]: ...
44324435
@property
4433-
def H(self) -> matrix[Any, _DType_co]: ...
4434-
def getT(self) -> matrix[Any, _DType_co]: ...
4435-
def getI(self) -> matrix[Any, Any]: ...
4436+
def H(self) -> matrix[_Shape2D, _DType_co]: ...
4437+
def getT(self) -> matrix[_Shape2D, _DType_co]: ...
4438+
def getI(self) -> matrix[_Shape2D, Any]: ...
44364439
def getA(self) -> ndarray[_Shape2DType_co, _DType_co]: ...
4437-
def getA1(self) -> ndarray[Any, _DType_co]: ...
4438-
def getH(self) -> matrix[Any, _DType_co]: ...
4440+
def getA1(self) -> ndarray[_Shape, _DType_co]: ...
4441+
def getH(self) -> matrix[_Shape2D, _DType_co]: ...
44394442

44404443
_CharType = TypeVar("_CharType", str_, bytes_)
44414444
_CharDType = TypeVar("_CharDType", dtype[str_], dtype[bytes_])

numpy/_core/defchararray.pyi

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ from numpy import (
2323

2424
from numpy._typing import (
2525
NDArray,
26+
_Shape,
2627
_ShapeLike,
2728
_ArrayLikeStr_co as U_co,
2829
_ArrayLikeBytes_co as S_co,
@@ -33,7 +34,7 @@ from numpy._typing import (
3334
from numpy._core.multiarray import compare_chararrays as compare_chararrays
3435

3536
_SCT = TypeVar("_SCT", str_, bytes_)
36-
_CharArray = chararray[Any, dtype[_SCT]]
37+
_CharArray = chararray[_Shape, dtype[_SCT]]
3738

3839
class chararray(ndarray[_ShapeType_co, _CharDType]):
3940
@overload
@@ -46,7 +47,7 @@ class chararray(ndarray[_ShapeType_co, _CharDType]):
4647
offset: SupportsIndex = ...,
4748
strides: _ShapeLike = ...,
4849
order: _OrderKACF = ...,
49-
) -> chararray[Any, dtype[bytes_]]: ...
50+
) -> chararray[_Shape, dtype[bytes_]]: ...
5051
@overload
5152
def __new__(
5253
subtype,
@@ -57,12 +58,12 @@ class chararray(ndarray[_ShapeType_co, _CharDType]):
5758
offset: SupportsIndex = ...,
5859
strides: _ShapeLike = ...,
5960
order: _OrderKACF = ...,
60-
) -> chararray[Any, dtype[str_]]: ...
61+
) -> chararray[_Shape, dtype[str_]]: ...
6162

6263
def __array_finalize__(self, obj: object) -> None: ...
63-
def __mul__(self, other: i_co) -> chararray[Any, _CharDType]: ...
64-
def __rmul__(self, other: i_co) -> chararray[Any, _CharDType]: ...
65-
def __mod__(self, i: Any) -> chararray[Any, _CharDType]: ...
64+
def __mul__(self, other: i_co) -> chararray[_Shape, _CharDType]: ...
65+
def __rmul__(self, other: i_co) -> chararray[_Shape, _CharDType]: ...
66+
def __mod__(self, i: Any) -> chararray[_Shape, _CharDType]: ...
6667

6768
@overload
6869
def __eq__(
@@ -210,7 +211,7 @@ class chararray(ndarray[_ShapeType_co, _CharDType]):
210211
def expandtabs(
211212
self,
212213
tabsize: i_co = ...,
213-
) -> chararray[Any, _CharDType]: ...
214+
) -> chararray[_Shape, _CharDType]: ...
214215

215216
@overload
216217
def find(
@@ -435,7 +436,7 @@ class chararray(ndarray[_ShapeType_co, _CharDType]):
435436
deletechars: None | S_co = ...,
436437
) -> _CharArray[bytes_]: ...
437438

438-
def zfill(self, width: _ArrayLikeInt_co) -> chararray[Any, _CharDType]: ...
439+
def zfill(self, width: _ArrayLikeInt_co) -> chararray[_Shape, _CharDType]: ...
439440
def capitalize(self) -> chararray[_ShapeType_co, _CharDType]: ...
440441
def title(self) -> chararray[_ShapeType_co, _CharDType]: ...
441442
def swapcase(self) -> chararray[_ShapeType_co, _CharDType]: ...

numpy/_core/records.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ from numpy._typing import (
2626
ArrayLike,
2727
DTypeLike,
2828
NDArray,
29+
_Shape,
2930
_ShapeLike,
3031
_ArrayLikeInt_co,
3132
_ArrayLikeVoid_co,
@@ -102,7 +103,7 @@ class recarray(ndarray[_ShapeType_co, _DType_co]):
102103
| SupportsIndex
103104
| _ArrayLikeInt_co
104105
| tuple[None | slice | EllipsisType | _ArrayLikeInt_co | SupportsIndex, ...]
105-
)) -> recarray[Any, _DType_co]: ...
106+
)) -> recarray[_Shape, _DType_co]: ...
106107
@overload
107108
def __getitem__(self, indx: (
108109
None
@@ -111,7 +112,7 @@ class recarray(ndarray[_ShapeType_co, _DType_co]):
111112
| SupportsIndex
112113
| _ArrayLikeInt_co
113114
| tuple[None | slice | EllipsisType | _ArrayLikeInt_co | SupportsIndex, ...]
114-
)) -> ndarray[Any, _DType_co]: ...
115+
)) -> ndarray[_Shape, _DType_co]: ...
115116
@overload
116117
def __getitem__(self, indx: str) -> NDArray[Any]: ...
117118
@overload

0 commit comments

Comments
 (0)