-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Expand file tree
/
Copy path_stride_tricks_impl.pyi
More file actions
75 lines (67 loc) · 1.99 KB
/
_stride_tricks_impl.pyi
File metadata and controls
75 lines (67 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
from collections.abc import Iterable
from typing import Any, overload
import numpy as np
from numpy._typing import ArrayLike, NDArray, _AnyShape, _ArrayLike, _ShapeLike
__all__ = ["broadcast_to", "broadcast_arrays", "broadcast_shapes"]
class DummyArray:
__array_interface__: dict[str, Any]
base: NDArray[Any] | None
def __init__(
self,
interface: dict[str, Any],
base: NDArray[Any] | None = None,
) -> None: ...
@overload
def as_strided[ScalarT: np.generic](
x: _ArrayLike[ScalarT],
shape: Iterable[int] | None = None,
strides: Iterable[int] | None = None,
subok: bool = False,
writeable: bool = True,
*,
check_bounds: bool | None = None
) -> NDArray[ScalarT]: ...
@overload
def as_strided(
x: ArrayLike,
shape: Iterable[int] | None = None,
strides: Iterable[int] | None = None,
subok: bool = False,
writeable: bool = True,
*,
check_bounds: bool | None = None
) -> NDArray[Any]: ...
@overload
def sliding_window_view[ScalarT: np.generic](
x: _ArrayLike[ScalarT],
window_shape: int | Iterable[int],
axis: int | tuple[int, ...] | None = None,
*,
subok: bool = False,
writeable: bool = False,
) -> NDArray[ScalarT]: ...
@overload
def sliding_window_view(
x: ArrayLike,
window_shape: int | Iterable[int],
axis: int | tuple[int, ...] | None = None,
*,
subok: bool = False,
writeable: bool = False,
) -> NDArray[Any]: ...
@overload
def broadcast_to[ScalarT: np.generic](
array: _ArrayLike[ScalarT],
shape: int | Iterable[int],
subok: bool = False,
) -> NDArray[ScalarT]: ...
@overload
def broadcast_to(
array: ArrayLike,
shape: int | Iterable[int],
subok: bool = False,
) -> NDArray[Any]: ...
def broadcast_shapes(*args: _ShapeLike) -> _AnyShape: ...
def broadcast_arrays(*args: ArrayLike, subok: bool = False) -> tuple[NDArray[Any], ...]: ...
# used internally by `lib._function_base_impl._parse_input_dimensions`
def _broadcast_shape(*args: ArrayLike) -> _AnyShape: ...