Memoryview.cast: shape= can be tuple of any number of ints (#5918)

This commit is contained in:
Gabe Joseph
2021-08-12 16:04:35 -06:00
committed by GitHub
parent 5691ea6d6a
commit 92aecadf6b

View File

@@ -642,7 +642,7 @@ class memoryview(Sized, Sequence[int]):
def __exit__(
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
) -> None: ...
def cast(self, format: str, shape: list[int] | Tuple[int] = ...) -> memoryview: ...
def cast(self, format: str, shape: list[int] | Tuple[int, ...] = ...) -> memoryview: ...
@overload
def __getitem__(self, i: SupportsIndex) -> int: ...
@overload