massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Stubs / third_party / 2and3 / numpy / core / _multiarray_umath.pyi
1 import builtins\r
2 import sys\r
3 \r
4 from typing import Any, Container, Dict, IO, Iterable, List, Mapping, Optional, overload, Sequence, Sized, SupportsAbs, SupportsComplex, SupportsFloat, SupportsInt, Text, Tuple, Type, TypeVar, Union\r
5 \r
6 # union of built-in scalar types\r
7 # see https://docs.scipy.org/doc/numpy/reference/arrays.scalars.html\r
8 _builtinScalarUnion = Union[\r
9     # TODO: fill the union with aliases from _type_aliases.py\r
10     int, float, bool\r
11 ]\r
12 \r
13 # union of types that can be used as dtype\r
14 # see: https://docs.scipy.org/doc/numpy/reference/arrays.dtypes.html#specifying-and-constructing-data-types\r
15 _dtypeUnion = Union[\r
16     dtype,\r
17     None,\r
18     _builtinScalarUnion,\r
19     str,\r
20     Tuple[Any, int],\r
21     Tuple[Any, Union[int, Sequence[int]]],\r
22     # [(field_name, field_dtype, field_shape), ...]\r
23     List[\r
24         Union[\r
25             Tuple[Union[str, Tuple[str, str]], Any],\r
26             Tuple[Union[str, Tuple[str, str]], Any, Union[int, Sequence[int]]]\r
27         ]\r
28     ],\r
29     # {'names': ..., 'formats': ..., 'offsets': ..., 'titles': ..., 'itemsize': ...}\r
30     Dict[str, Union[Sequence[str], Sequence[Any], Sequence[int], Sequence[Union[bytes, Text, None]], int]],\r
31     # {'field1': ..., 'field2': ..., ...}\r
32     Dict[str, Tuple[Any, int]],\r
33     # (base_dtype, new_dtype)\r
34     Tuple[Any, Any]\r
35 ]\r
36 \r
37 # actual dtype\r
38 # see: https://docs.scipy.org/doc/numpy/reference/generated/numpy.dtype.html\r
39 class dtype:\r
40     def __init__(self, obj: _dtypeUnion, align: bool = ..., copy: bool = ...) -> None: ...\r
41 \r
42     # properties\r
43     @property\r
44     def alignment(self) -> int: ...\r
45     @property\r
46     def base(self) -> dtype: ...\r
47     @property\r
48     def byteorder(self) -> str: ...\r
49     @property\r
50     def char(self) -> str: ...\r
51     @property # https://docs.scipy.org/doc/numpy/reference/arrays.interface.html\r
52     def descr(self) -> List[Union[Tuple[str, str], Tuple[str, str, Tuple[int, ...]]]]: ...\r
53     @property\r
54     def fields(self) -> Optional[Mapping[str, Union[Tuple[dtype, int], Tuple[dtype, int, Any]]]]: ...\r
55     @property\r
56     def flags(self) -> int: ...\r
57     @property\r
58     def hasobject(self) -> bool: ...\r
59     @property\r
60     def isbuiltin(self) -> int: ...\r
61     @property\r
62     def isnative(self) -> bool: ...\r
63     @property\r
64     def isalignedstruct(self) -> bool: ...\r
65     @property\r
66     def itemsize(self) -> int: ...\r
67     @property\r
68     def kind(self) -> str: ...\r
69     @property\r
70     def metadata(self) -> Any: ...\r
71     @property\r
72     def name(self) -> str: ...\r
73     @property\r
74     def names(self) -> Optional[Tuple[str, ...]]: ...\r
75     @property\r
76     def ndim(self) -> int: ...\r
77     @property\r
78     def num(self) -> int: ...\r
79     @property\r
80     def shape(self) -> Tuple[int, ...]: ...\r
81     @property\r
82     def subdtype(self) -> Optional[Tuple[dtype, Tuple[int, ...]]]: ...\r
83     @property\r
84     def str(self) -> builtins.str: ...\r
85     @property\r
86     def type(self) -> Type[_generic]: ...\r
87 \r
88     # methods\r
89     def newbyteorder(self, new_order: str = ...) -> dtype: ...\r
90 \r
91 _generic = Any\r
92 _array_like = Sequence[Any]\r
93 _Tndarray = TypeVar("_Tndarray", bound=ndarray)\r
94 \r
95 # A 1-D iterator over the array\r
96 # see: https://docs.scipy.org/doc/numpy/reference/generated/numpy.flatiter.htm\r
97 class flatiter:\r
98     @property\r
99     def base(self) -> ndarray: ...\r
100     @property\r
101     def coords(self) -> Tuple[int, ...]: ...\r
102     @property\r
103     def index(self) -> int: ...\r
104 \r
105     def copy(self) -> ndarray: ...\r
106     def __iter__(self) -> flatiter: ...\r
107     def __next__(self) -> Any: ...\r
108 \r
109 class ndarray:\r
110     # properties\r
111     @property\r
112     def base(self) -> Optional[ndarray]: ...\r
113     @property\r
114     def ctypes(self) -> Any: ...\r
115     @property\r
116     def data(self) -> memoryview: ...\r
117     @property\r
118     def dtype(self) -> _dtypeUnion: ...\r
119     @property\r
120     def flags(self) -> Dict[str, bool]: ...\r
121     @property\r
122     def flat(self) -> flatiter: ...\r
123     @property\r
124     def imag(self) -> ndarray: ...\r
125     @property\r
126     def itemsize(self) -> int: ...\r
127     @property\r
128     def nbytes(self) -> int: ...\r
129     @property\r
130     def ndim(self) -> int: ...\r
131     @property\r
132     def real(self) -> ndarray: ...\r
133     @property\r
134     def shape(self) -> Tuple[int, ...]: ...\r
135     @property\r
136     def size(self) -> int: ...\r
137     @property\r
138     def T(self) -> ndarray: ...\r
139 \r
140     def all(self, axis: Union[int, Tuple[int, ...]] = ..., out: ndarray = ..., keepdims: bool = ...) -> Union[bool, ndarray]: ...\r
141     def any(self, axis: Union[int, Tuple[int, ...]] = ..., out: ndarray = ..., keepdims: bool = ...) -> Union[bool, ndarray]: ...\r
142     def argmax(self, axis: int = ..., out: array_like = ...) -> ndarray: ...\r
143     def argmin(self, axis: int = ..., out: array_like = ...) -> ndarray: ...\r
144     def argpartition(self, kth: Union[int, Sequence[int]], axis: int = ..., kind: str = ..., order: Union[str, Sequence[str]] = ...) -> ndarray: ...\r
145     def argsort(self, axis: int = ..., kind: str = ..., order: Union[str, Sequence[str]] = ...) -> ndarray: ...\r
146     def astype(self, dtype: _dtypeUnion, order: str = 'K', casting: str = 'unsafe', subok: bool = ..., copy: bool = ...) -> ndarray: ...\r
147     def byteswap(self, inplace: bool = False) -> ndarray: ...\r
148     def choose(self, choices: Sequence[array_like], out: ndarray = ..., mode: str = 'raise') -> ndarray: ...\r
149     def clip(self, min: Union[_generic, array_like] = ..., max: Union[_generic, array_like] = ..., out: ndarray = ...) -> ndarray: ...\r
150     def compress(self, condition: Sequence[bool], axis: int = ..., out: ndarray = ...) -> ndarray: ...\r
151     def copy(self, order: str = 'C') -> ndarray: ...\r
152     def cumprod(self, axis: int = ..., dtype: _dtypeUnion = ..., out: ndarray = ...) -> ndarray: ...\r
153     def cumsum(self, axis: int = ..., dtype: _dtypeUnion = ..., out: ndarray = ...) -> ndarray: ...\r
154     def diagonal(self, offset: int = ..., axis1: int = ..., axis2: int = ...) -> ndarray: ...\r
155     def dot(self, b: array_like, out: ndarray = ...) -> ndarray: ...\r
156     def dump(self, file: str) -> None: ...\r
157     def dumps(self) -> bytes: ...\r
158     def fill(self, value: _generic) -> None: ...\r
159     def flatten(self, order: str = ...) -> ndarray: ...\r
160     def getfield(self, dtype: _dtypeUnion, offset: int = ...) -> ndarray: ...\r
161     @overload\r
162     def item(self, *args: int) -> _generic: ...\r
163     @overload\r
164     def item(self, args: Tuple[int, ...]) -> _generic: ...\r
165     @overload\r
166     def itemset(self, value: _generic) -> None: ...\r
167     @overload\r
168     def itemset(self, item: Union[int, Tuple[int, ...]], value: _generic) -> None: ...\r
169     def max(self, axis: Union[int, Tuple[int, ...]] = ..., out: ndarray = ..., keepdims: bool = ...) -> Union[ndarray, _generic]: ...\r
170     def mean(self, axis: Union[int, Tuple[int, ...]] = ..., dtype: _dtypeUnion = ..., out: ndarray = ..., keepdims: bool = ...) -> Union[ndarray, _generic]: ...\r
171     def min(self, axis: Union[int, Tuple[int, ...]] = ..., out: ndarray = ..., keepdims: bool = ...) -> Union[ndarray, _generic]: ...\r
172     def newbyteorder(self, new_order: str = 'S') -> dtype: ...\r
173     def nonzero(self) -> Tuple[ndarray]: ...\r
174     def partition(self, kth: Union[int, Sequence[int]], axis: int = -1, kind: str = 'introselect', order: Union[str, Sequence[str]] = ...) -> None: ...\r
175     def prod(self, axis: Union[int, Tuple[int, ...]] = ..., dtype: _dtypeUnion = ..., out: ndarray = ..., keepdims: bool = False) -> ndarray: ...\r
176     def ptp(self, axis: Union[int, Tuple[int, ...]] = ..., out: array_like = ..., keepdims: bool = ...) -> ndarray: ...\r
177     def put(self, ind: Sequence[int], v: array_like, order: str = ...) -> None: ...\r
178     def ravel(self, order: str = ...) -> ndarray: ...\r
179     def repeat(self, repeats: Union[int, Sequence[int]] = ..., axis: int = ...) -> ndarray: ...\r
180     @overload\r
181     def reshape(self, shape: Sequence[int], order: str = ...) -> ndarray: ...\r
182     @overload\r
183     def reshape(self, *shape: int, order: str = ...) -> ndarray: ...\r
184     @overload\r
185     def resize(self, new_shape: Sequence[int], *, refcheck: bool = True) -> None: ...\r
186     @overload\r
187     def resize(self, *new_shape: int, refcheck: bool = True) -> None: ...\r
188     def round(self, decimals: int = 0, out: ndarray = ...) -> ndarray: ...\r
189     def searchsorted(self, v: array_like, side: str = ..., sorter: Sequence[int] = ...) -> List[int]: ...\r
190     def setfield(self, val: object, dtype: _dtypeUnion, offset: int = ...) -> None: ...\r
191     def setflags(self, write: bool = ..., align: bool = ..., uic: bool = ...) -> None: ...\r
192     def sort(self, axis: int = -1, kind: str = 'quicksort', order: Union[str, Sequence[str]] = ...) -> None: ...\r
193     def squeeze(self, axis: Union[int, Tuple[int, ...]] = ...) -> ndarray: ...\r
194     def std(self, axis: Union[int, Sequence[int]] = ..., dtype: _dtypeUnion = ..., out: ndarray = ..., ddof: int = 0, keepdims: bool = ...) -> ndarray: ...\r
195     def strides(self) -> Tuple[int, ...]: ...\r
196     def sum(self, axis: Union[int, Sequence[int]] = ..., dtype: _dtypeUnion = ..., out: ndarray = ..., keepdims: bool = ...) -> ndarray: ...\r
197     def swapaxes(self, axis1: int, axis2: int) -> ndarray: ...\r
198     def take(self, indices: array_like, axis: int = ..., out: ndarray = ..., mode: str = ...) -> ndarray: ...\r
199     def tobytes(self, order: Optional[str] = ...) -> bytes: ...\r
200     def tofile(self, fid: Union[IO[bytes], str], sep: str = ..., format: str = ...) -> None: ...\r
201     def tolist(self) -> List[Any]: ...\r
202     def tostring(self, order: Optional[str] = ...) -> bytes: ...\r
203     def trace(self, offset: int = 0, axis1: int = 0, axis2: int = 1, dtype: _dtypeUnion = ..., out: ndarray = ...) -> ndarray: ...\r
204     def transpose(self, axes: Sequence[int]) -> ndarray: ...\r
205     def var(self, axis: Union[int, Tuple[int, ...]] = ..., dtype: _dtypeUnion = ..., out: ndarray = ..., ddof: int = 0, keepdims: bool = ...) -> ndarray: ...\r
206     @overload\r
207     def view(self, dtype: Type[_Tndarray]) -> _Tndarray: ...\r
208     @overload\r
209     def view(self, dtype: _dtypeUnion = ...) -> ndarray: ...\r
210     @overload\r
211     def view(self, dtype: _dtypeUnion, type: Type[_Tndarray]) -> _Tndarray: ...\r
212     @overload\r
213     def view(self, *, type: Type[_Tndarray]) -> _Tndarray: ...\r
214 \r
215 @overload\r
216 def arange(stop: _builtinScalarUnion, step: _builtinScalarUnion = ..., dtype: _dtypeUnion = ...)  -> ndarray: ...\r
217 @overload\r
218 def arange(start: _builtinScalarUnion, stop: _builtinScalarUnion, step: _builtinScalarUnion = ..., dtype: _dtypeUnion = ...)  -> ndarray: ...\r
219 def array(object: _array_like, dtype: _dtypeUnion = ..., copy: bool = ..., subok: bool = ..., ndmin: int = ...) -> ndarray: ...\r
220 def empty(shape: Union[int, Tuple[int, ...]], dtype: _dtypeUnion = ..., order: str = 'C') -> ndarray: ...\r