--- /dev/null
+import builtins\r
+import sys\r
+\r
+from typing import Any, Container, Dict, IO, Iterable, List, Mapping, Optional, overload, Sequence, Sized, SupportsAbs, SupportsComplex, SupportsFloat, SupportsInt, Text, Tuple, Type, TypeVar, Union\r
+\r
+# union of built-in scalar types\r
+# see https://docs.scipy.org/doc/numpy/reference/arrays.scalars.html\r
+_builtinScalarUnion = Union[\r
+ # TODO: fill the union with aliases from _type_aliases.py\r
+ int, float, bool\r
+]\r
+\r
+# union of types that can be used as dtype\r
+# see: https://docs.scipy.org/doc/numpy/reference/arrays.dtypes.html#specifying-and-constructing-data-types\r
+_dtypeUnion = Union[\r
+ dtype,\r
+ None,\r
+ _builtinScalarUnion,\r
+ str,\r
+ Tuple[Any, int],\r
+ Tuple[Any, Union[int, Sequence[int]]],\r
+ # [(field_name, field_dtype, field_shape), ...]\r
+ List[\r
+ Union[\r
+ Tuple[Union[str, Tuple[str, str]], Any],\r
+ Tuple[Union[str, Tuple[str, str]], Any, Union[int, Sequence[int]]]\r
+ ]\r
+ ],\r
+ # {'names': ..., 'formats': ..., 'offsets': ..., 'titles': ..., 'itemsize': ...}\r
+ Dict[str, Union[Sequence[str], Sequence[Any], Sequence[int], Sequence[Union[bytes, Text, None]], int]],\r
+ # {'field1': ..., 'field2': ..., ...}\r
+ Dict[str, Tuple[Any, int]],\r
+ # (base_dtype, new_dtype)\r
+ Tuple[Any, Any]\r
+]\r
+\r
+# actual dtype\r
+# see: https://docs.scipy.org/doc/numpy/reference/generated/numpy.dtype.html\r
+class dtype:\r
+ def __init__(self, obj: _dtypeUnion, align: bool = ..., copy: bool = ...) -> None: ...\r
+\r
+ # properties\r
+ @property\r
+ def alignment(self) -> int: ...\r
+ @property\r
+ def base(self) -> dtype: ...\r
+ @property\r
+ def byteorder(self) -> str: ...\r
+ @property\r
+ def char(self) -> str: ...\r
+ @property # https://docs.scipy.org/doc/numpy/reference/arrays.interface.html\r
+ def descr(self) -> List[Union[Tuple[str, str], Tuple[str, str, Tuple[int, ...]]]]: ...\r
+ @property\r
+ def fields(self) -> Optional[Mapping[str, Union[Tuple[dtype, int], Tuple[dtype, int, Any]]]]: ...\r
+ @property\r
+ def flags(self) -> int: ...\r
+ @property\r
+ def hasobject(self) -> bool: ...\r
+ @property\r
+ def isbuiltin(self) -> int: ...\r
+ @property\r
+ def isnative(self) -> bool: ...\r
+ @property\r
+ def isalignedstruct(self) -> bool: ...\r
+ @property\r
+ def itemsize(self) -> int: ...\r
+ @property\r
+ def kind(self) -> str: ...\r
+ @property\r
+ def metadata(self) -> Any: ...\r
+ @property\r
+ def name(self) -> str: ...\r
+ @property\r
+ def names(self) -> Optional[Tuple[str, ...]]: ...\r
+ @property\r
+ def ndim(self) -> int: ...\r
+ @property\r
+ def num(self) -> int: ...\r
+ @property\r
+ def shape(self) -> Tuple[int, ...]: ...\r
+ @property\r
+ def subdtype(self) -> Optional[Tuple[dtype, Tuple[int, ...]]]: ...\r
+ @property\r
+ def str(self) -> builtins.str: ...\r
+ @property\r
+ def type(self) -> Type[_generic]: ...\r
+\r
+ # methods\r
+ def newbyteorder(self, new_order: str = ...) -> dtype: ...\r
+\r
+_generic = Any\r
+_array_like = Sequence[Any]\r
+_Tndarray = TypeVar("_Tndarray", bound=ndarray)\r
+\r
+# A 1-D iterator over the array\r
+# see: https://docs.scipy.org/doc/numpy/reference/generated/numpy.flatiter.htm\r
+class flatiter:\r
+ @property\r
+ def base(self) -> ndarray: ...\r
+ @property\r
+ def coords(self) -> Tuple[int, ...]: ...\r
+ @property\r
+ def index(self) -> int: ...\r
+\r
+ def copy(self) -> ndarray: ...\r
+ def __iter__(self) -> flatiter: ...\r
+ def __next__(self) -> Any: ...\r
+\r
+class ndarray:\r
+ # properties\r
+ @property\r
+ def base(self) -> Optional[ndarray]: ...\r
+ @property\r
+ def ctypes(self) -> Any: ...\r
+ @property\r
+ def data(self) -> memoryview: ...\r
+ @property\r
+ def dtype(self) -> _dtypeUnion: ...\r
+ @property\r
+ def flags(self) -> Dict[str, bool]: ...\r
+ @property\r
+ def flat(self) -> flatiter: ...\r
+ @property\r
+ def imag(self) -> ndarray: ...\r
+ @property\r
+ def itemsize(self) -> int: ...\r
+ @property\r
+ def nbytes(self) -> int: ...\r
+ @property\r
+ def ndim(self) -> int: ...\r
+ @property\r
+ def real(self) -> ndarray: ...\r
+ @property\r
+ def shape(self) -> Tuple[int, ...]: ...\r
+ @property\r
+ def size(self) -> int: ...\r
+ @property\r
+ def T(self) -> ndarray: ...\r
+\r
+ def all(self, axis: Union[int, Tuple[int, ...]] = ..., out: ndarray = ..., keepdims: bool = ...) -> Union[bool, ndarray]: ...\r
+ def any(self, axis: Union[int, Tuple[int, ...]] = ..., out: ndarray = ..., keepdims: bool = ...) -> Union[bool, ndarray]: ...\r
+ def argmax(self, axis: int = ..., out: array_like = ...) -> ndarray: ...\r
+ def argmin(self, axis: int = ..., out: array_like = ...) -> ndarray: ...\r
+ def argpartition(self, kth: Union[int, Sequence[int]], axis: int = ..., kind: str = ..., order: Union[str, Sequence[str]] = ...) -> ndarray: ...\r
+ def argsort(self, axis: int = ..., kind: str = ..., order: Union[str, Sequence[str]] = ...) -> ndarray: ...\r
+ def astype(self, dtype: _dtypeUnion, order: str = 'K', casting: str = 'unsafe', subok: bool = ..., copy: bool = ...) -> ndarray: ...\r
+ def byteswap(self, inplace: bool = False) -> ndarray: ...\r
+ def choose(self, choices: Sequence[array_like], out: ndarray = ..., mode: str = 'raise') -> ndarray: ...\r
+ def clip(self, min: Union[_generic, array_like] = ..., max: Union[_generic, array_like] = ..., out: ndarray = ...) -> ndarray: ...\r
+ def compress(self, condition: Sequence[bool], axis: int = ..., out: ndarray = ...) -> ndarray: ...\r
+ def copy(self, order: str = 'C') -> ndarray: ...\r
+ def cumprod(self, axis: int = ..., dtype: _dtypeUnion = ..., out: ndarray = ...) -> ndarray: ...\r
+ def cumsum(self, axis: int = ..., dtype: _dtypeUnion = ..., out: ndarray = ...) -> ndarray: ...\r
+ def diagonal(self, offset: int = ..., axis1: int = ..., axis2: int = ...) -> ndarray: ...\r
+ def dot(self, b: array_like, out: ndarray = ...) -> ndarray: ...\r
+ def dump(self, file: str) -> None: ...\r
+ def dumps(self) -> bytes: ...\r
+ def fill(self, value: _generic) -> None: ...\r
+ def flatten(self, order: str = ...) -> ndarray: ...\r
+ def getfield(self, dtype: _dtypeUnion, offset: int = ...) -> ndarray: ...\r
+ @overload\r
+ def item(self, *args: int) -> _generic: ...\r
+ @overload\r
+ def item(self, args: Tuple[int, ...]) -> _generic: ...\r
+ @overload\r
+ def itemset(self, value: _generic) -> None: ...\r
+ @overload\r
+ def itemset(self, item: Union[int, Tuple[int, ...]], value: _generic) -> None: ...\r
+ def max(self, axis: Union[int, Tuple[int, ...]] = ..., out: ndarray = ..., keepdims: bool = ...) -> Union[ndarray, _generic]: ...\r
+ def mean(self, axis: Union[int, Tuple[int, ...]] = ..., dtype: _dtypeUnion = ..., out: ndarray = ..., keepdims: bool = ...) -> Union[ndarray, _generic]: ...\r
+ def min(self, axis: Union[int, Tuple[int, ...]] = ..., out: ndarray = ..., keepdims: bool = ...) -> Union[ndarray, _generic]: ...\r
+ def newbyteorder(self, new_order: str = 'S') -> dtype: ...\r
+ def nonzero(self) -> Tuple[ndarray]: ...\r
+ def partition(self, kth: Union[int, Sequence[int]], axis: int = -1, kind: str = 'introselect', order: Union[str, Sequence[str]] = ...) -> None: ...\r
+ def prod(self, axis: Union[int, Tuple[int, ...]] = ..., dtype: _dtypeUnion = ..., out: ndarray = ..., keepdims: bool = False) -> ndarray: ...\r
+ def ptp(self, axis: Union[int, Tuple[int, ...]] = ..., out: array_like = ..., keepdims: bool = ...) -> ndarray: ...\r
+ def put(self, ind: Sequence[int], v: array_like, order: str = ...) -> None: ...\r
+ def ravel(self, order: str = ...) -> ndarray: ...\r
+ def repeat(self, repeats: Union[int, Sequence[int]] = ..., axis: int = ...) -> ndarray: ...\r
+ @overload\r
+ def reshape(self, shape: Sequence[int], order: str = ...) -> ndarray: ...\r
+ @overload\r
+ def reshape(self, *shape: int, order: str = ...) -> ndarray: ...\r
+ @overload\r
+ def resize(self, new_shape: Sequence[int], *, refcheck: bool = True) -> None: ...\r
+ @overload\r
+ def resize(self, *new_shape: int, refcheck: bool = True) -> None: ...\r
+ def round(self, decimals: int = 0, out: ndarray = ...) -> ndarray: ...\r
+ def searchsorted(self, v: array_like, side: str = ..., sorter: Sequence[int] = ...) -> List[int]: ...\r
+ def setfield(self, val: object, dtype: _dtypeUnion, offset: int = ...) -> None: ...\r
+ def setflags(self, write: bool = ..., align: bool = ..., uic: bool = ...) -> None: ...\r
+ def sort(self, axis: int = -1, kind: str = 'quicksort', order: Union[str, Sequence[str]] = ...) -> None: ...\r
+ def squeeze(self, axis: Union[int, Tuple[int, ...]] = ...) -> ndarray: ...\r
+ def std(self, axis: Union[int, Sequence[int]] = ..., dtype: _dtypeUnion = ..., out: ndarray = ..., ddof: int = 0, keepdims: bool = ...) -> ndarray: ...\r
+ def strides(self) -> Tuple[int, ...]: ...\r
+ def sum(self, axis: Union[int, Sequence[int]] = ..., dtype: _dtypeUnion = ..., out: ndarray = ..., keepdims: bool = ...) -> ndarray: ...\r
+ def swapaxes(self, axis1: int, axis2: int) -> ndarray: ...\r
+ def take(self, indices: array_like, axis: int = ..., out: ndarray = ..., mode: str = ...) -> ndarray: ...\r
+ def tobytes(self, order: Optional[str] = ...) -> bytes: ...\r
+ def tofile(self, fid: Union[IO[bytes], str], sep: str = ..., format: str = ...) -> None: ...\r
+ def tolist(self) -> List[Any]: ...\r
+ def tostring(self, order: Optional[str] = ...) -> bytes: ...\r
+ def trace(self, offset: int = 0, axis1: int = 0, axis2: int = 1, dtype: _dtypeUnion = ..., out: ndarray = ...) -> ndarray: ...\r
+ def transpose(self, axes: Sequence[int]) -> ndarray: ...\r
+ def var(self, axis: Union[int, Tuple[int, ...]] = ..., dtype: _dtypeUnion = ..., out: ndarray = ..., ddof: int = 0, keepdims: bool = ...) -> ndarray: ...\r
+ @overload\r
+ def view(self, dtype: Type[_Tndarray]) -> _Tndarray: ...\r
+ @overload\r
+ def view(self, dtype: _dtypeUnion = ...) -> ndarray: ...\r
+ @overload\r
+ def view(self, dtype: _dtypeUnion, type: Type[_Tndarray]) -> _Tndarray: ...\r
+ @overload\r
+ def view(self, *, type: Type[_Tndarray]) -> _Tndarray: ...\r
+\r
+@overload\r
+def arange(stop: _builtinScalarUnion, step: _builtinScalarUnion = ..., dtype: _dtypeUnion = ...) -> ndarray: ...\r
+@overload\r
+def arange(start: _builtinScalarUnion, stop: _builtinScalarUnion, step: _builtinScalarUnion = ..., dtype: _dtypeUnion = ...) -> ndarray: ...\r
+def array(object: _array_like, dtype: _dtypeUnion = ..., copy: bool = ..., subok: bool = ..., ndmin: int = ...) -> ndarray: ...\r
+def empty(shape: Union[int, Tuple[int, ...]], dtype: _dtypeUnion = ..., order: str = 'C') -> ndarray: ...\r