|
| 1 | +from types import ModuleType |
| 2 | +from typing import ( |
| 3 | + Sequence, |
| 4 | + Optional, |
| 5 | + TypeVar, |
| 6 | + Union, |
| 7 | + Tuple, |
| 8 | + List, |
| 9 | + Iterable, |
| 10 | + Callable, |
| 11 | + Any, |
| 12 | +) |
| 13 | + |
| 14 | +from numpy import ndarray, dtype, _ArrayLike, _ShapeLike |
| 15 | + |
| 16 | +_T = TypeVar("_T") |
| 17 | + |
| 18 | +def zeros_like( |
| 19 | + a: _ArrayLike, |
| 20 | + dtype: Optional[dtype] = ..., |
| 21 | + order: str = ..., |
| 22 | + subok: bool = ..., |
| 23 | + shape: Optional[Union[int, Sequence[int]]] = ..., |
| 24 | +) -> ndarray[int]: ... |
| 25 | +def ones( |
| 26 | + shape: _ShapeLike, dtype: Optional[dtype] = ..., order: str = ... |
| 27 | +) -> ndarray[int]: ... |
| 28 | +def ones_like( |
| 29 | + a: _ArrayLike, |
| 30 | + dtype: Optional[dtype] = ..., |
| 31 | + order: str = ..., |
| 32 | + subok: bool = ..., |
| 33 | + shape: Optional[_ShapeLike] = ..., |
| 34 | +) -> ndarray[int]: ... |
| 35 | +def full( |
| 36 | + shape: _ShapeLike, fill_value: _T, dtype: Optional[dtype] = ..., order: str = ... |
| 37 | +) -> ndarray[_T]: ... |
| 38 | +def full_like( |
| 39 | + a: _ArrayLike, |
| 40 | + fill_value: _T, |
| 41 | + dtype: Optional[dtype] = ..., |
| 42 | + order: str = ..., |
| 43 | + subok: bool = ..., |
| 44 | + shape: Optional[_ShapeLike] = ..., |
| 45 | +) -> ndarray[_T]: ... |
| 46 | +def count_nonzero( |
| 47 | + a: _ArrayLike, axis: Optional[Union[int, Tuple[int], Tuple[int, int]]] = ... |
| 48 | +) -> Union[int, ndarray[int]]: ... |
| 49 | +def isfortran(a: ndarray) -> bool: ... |
| 50 | +def argwhere(a: _ArrayLike) -> ndarray: ... |
| 51 | +def flatnonzero(a: _ArrayLike) -> ndarray: ... |
| 52 | +def correlate(a: _ArrayLike, v: _ArrayLike, mode: str = ...) -> ndarray: ... |
| 53 | +def convolve(a: _ArrayLike, v: _ArrayLike, mode: str = ...) -> ndarray: ... |
| 54 | +def outer(a: _ArrayLike, b: _ArrayLike, out: ndarray = ...) -> ndarray: ... |
| 55 | +def tensordot( |
| 56 | + a: _ArrayLike, |
| 57 | + b: _ArrayLike, |
| 58 | + axes: Union[ |
| 59 | + int, Tuple[int, int], Tuple[Tuple[int, int], ...], Tuple[List[int, int], ...] |
| 60 | + ] = ..., |
| 61 | +) -> ndarray: ... |
| 62 | +def roll( |
| 63 | + a: _ArrayLike, |
| 64 | + shift: Union[int, Tuple[int, ...]], |
| 65 | + axis: Optional[Union[int, Tuple[int, ...]]] = ..., |
| 66 | +) -> _T: ... |
| 67 | +def rollaxis(a: _ArrayLike, axis: int, start: int = ...) -> ndarray: ... |
| 68 | +def normalize_axis_tuple( |
| 69 | + axis: Union[int, Iterable[int]], |
| 70 | + ndim: int, |
| 71 | + argname: Optional[str] = ..., |
| 72 | + allow_duplicate: bool = ..., |
| 73 | +) -> Tuple[int, ...]: ... |
| 74 | +def moveaxis( |
| 75 | + a: ndarray, |
| 76 | + source: Union[int, Sequence[int]], |
| 77 | + destination: Union[int, Sequence[int]], |
| 78 | +) -> ndarray: ... |
| 79 | +def cross( |
| 80 | + a: _ArrayLike, |
| 81 | + b: _ArrayLike, |
| 82 | + axisa: int = ..., |
| 83 | + axisb: int = ..., |
| 84 | + axisc: int = ..., |
| 85 | + axis: Optional[int] = ..., |
| 86 | +) -> ndarray: ... |
| 87 | +def indices( |
| 88 | + dimensions: Sequence[int], dtype: dtype = ..., sparse: bool = ... |
| 89 | +) -> Union[ndarray, Tuple[ndarray, ...]]: ... |
| 90 | +def fromfunction(function: Callable, shape: Tuple[int, int], **kwargs) -> Any: ... |
| 91 | +def isscalar(element: Any) -> bool: ... |
| 92 | +def binary_repr(num: int, width: Optional[int] = ...) -> str: ... |
| 93 | +def base_repr(number: int, base: int = ..., padding: int = ...) -> str: ... |
| 94 | +def identity(n: int, dtype: Optional[dtype] = ...) -> ndarray: ... |
| 95 | +def allclose( |
| 96 | + a: _ArrayLike, |
| 97 | + b: _ArrayLike, |
| 98 | + rtol: float = ..., |
| 99 | + atol: float = ..., |
| 100 | + equal_nan: bool = ..., |
| 101 | +) -> bool: ... |
| 102 | +def isclose( |
| 103 | + a: _ArrayLike, |
| 104 | + b: _ArrayLike, |
| 105 | + rtol: float = ..., |
| 106 | + atol: float = ..., |
| 107 | + equal_nan: bool = ..., |
| 108 | +) -> _ArrayLike: ... |
| 109 | +def array_equal(a1: _ArrayLike, a2: _ArrayLike) -> bool: ... |
| 110 | +def array_equiv(a1: _ArrayLike, a2: _ArrayLike) -> bool: ... |
| 111 | +def extend_all(module: ModuleType): ... |
0 commit comments