Initial configuration commit
This commit is contained in:
commit
31c8abea59
266 changed files with 780274 additions and 0 deletions
4
typings/numpy/core/__init__.pyi
Normal file
4
typings/numpy/core/__init__.pyi
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
25
typings/numpy/core/_asarray.pyi
Normal file
25
typings/numpy/core/_asarray.pyi
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from collections.abc import Iterable
|
||||
from typing import Any, Literal, TypeVar, Union, overload
|
||||
from numpy import ndarray
|
||||
from numpy._typing import DTypeLike, _SupportsArrayFunc
|
||||
|
||||
_ArrayType = TypeVar("_ArrayType", bound=ndarray[Any, Any])
|
||||
_Requirements = Literal["C", "C_CONTIGUOUS", "CONTIGUOUS", "F", "F_CONTIGUOUS", "FORTRAN", "A", "ALIGNED", "W", "WRITEABLE", "O", "OWNDATA"]
|
||||
_E = Literal["E", "ENSUREARRAY"]
|
||||
_RequirementsWithE = Union[_Requirements, _E]
|
||||
@overload
|
||||
def require(a: _ArrayType, dtype: None = ..., requirements: None | _Requirements | Iterable[_Requirements] = ..., *, like: _SupportsArrayFunc = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def require(a: object, dtype: DTypeLike = ..., requirements: _E | Iterable[_RequirementsWithE] = ..., *, like: _SupportsArrayFunc = ...) -> ndarray[Any, Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def require(a: object, dtype: DTypeLike = ..., requirements: None | _Requirements | Iterable[_Requirements] = ..., *, like: _SupportsArrayFunc = ...) -> ndarray[Any, Any]:
|
||||
...
|
||||
|
||||
44
typings/numpy/core/_internal.pyi
Normal file
44
typings/numpy/core/_internal.pyi
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import ctypes as ct
|
||||
from typing import Any, Generic, TypeVar, overload
|
||||
from numpy import ndarray
|
||||
from numpy.ctypeslib import c_intp
|
||||
|
||||
_CastT = TypeVar("_CastT", bound=ct._CanCastTo)
|
||||
_CT = TypeVar("_CT", bound=ct._CData)
|
||||
_PT = TypeVar("_PT", bound=None | int)
|
||||
class _ctypes(Generic[_PT]):
|
||||
@overload
|
||||
def __new__(cls, array: ndarray[Any, Any], ptr: None = ...) -> _ctypes[None]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def __new__(cls, array: ndarray[Any, Any], ptr: _PT) -> _ctypes[_PT]:
|
||||
...
|
||||
|
||||
@property
|
||||
def data(self) -> _PT:
|
||||
...
|
||||
|
||||
@property
|
||||
def shape(self) -> ct.Array[c_intp]:
|
||||
...
|
||||
|
||||
@property
|
||||
def strides(self) -> ct.Array[c_intp]:
|
||||
...
|
||||
|
||||
def data_as(self, obj: type[_CastT]) -> _CastT:
|
||||
...
|
||||
|
||||
def shape_as(self, obj: type[_CT]) -> ct.Array[_CT]:
|
||||
...
|
||||
|
||||
def strides_as(self, obj: type[_CT]) -> ct.Array[_CT]:
|
||||
...
|
||||
|
||||
|
||||
|
||||
18
typings/numpy/core/_type_aliases.pyi
Normal file
18
typings/numpy/core/_type_aliases.pyi
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import Any, TypedDict
|
||||
from numpy import complexfloating, floating, generic, signedinteger, unsignedinteger
|
||||
|
||||
class _SCTypes(TypedDict):
|
||||
int: list[type[signedinteger[Any]]]
|
||||
uint: list[type[unsignedinteger[Any]]]
|
||||
float: list[type[floating[Any]]]
|
||||
complex: list[type[complexfloating[Any, Any]]]
|
||||
others: list[type]
|
||||
...
|
||||
|
||||
|
||||
sctypeDict: dict[int | str, type[generic]]
|
||||
sctypes: _SCTypes
|
||||
45
typings/numpy/core/_ufunc_config.pyi
Normal file
45
typings/numpy/core/_ufunc_config.pyi
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from collections.abc import Callable
|
||||
from typing import Any, Literal, TypedDict
|
||||
from numpy import _SupportsWrite
|
||||
|
||||
_ErrKind = Literal["ignore", "warn", "raise", "call", "print", "log"]
|
||||
_ErrFunc = Callable[[str, int], Any]
|
||||
class _ErrDict(TypedDict):
|
||||
divide: _ErrKind
|
||||
over: _ErrKind
|
||||
under: _ErrKind
|
||||
invalid: _ErrKind
|
||||
...
|
||||
|
||||
|
||||
class _ErrDictOptional(TypedDict, total=False):
|
||||
all: None | _ErrKind
|
||||
divide: None | _ErrKind
|
||||
over: None | _ErrKind
|
||||
under: None | _ErrKind
|
||||
invalid: None | _ErrKind
|
||||
...
|
||||
|
||||
|
||||
def seterr(all: None | _ErrKind = ..., divide: None | _ErrKind = ..., over: None | _ErrKind = ..., under: None | _ErrKind = ..., invalid: None | _ErrKind = ...) -> _ErrDict:
|
||||
...
|
||||
|
||||
def geterr() -> _ErrDict:
|
||||
...
|
||||
|
||||
def setbufsize(size: int) -> int:
|
||||
...
|
||||
|
||||
def getbufsize() -> int:
|
||||
...
|
||||
|
||||
def seterrcall(func: None | _ErrFunc | _SupportsWrite[str]) -> None | _ErrFunc | _SupportsWrite[str]:
|
||||
...
|
||||
|
||||
def geterrcall() -> None | _ErrFunc | _SupportsWrite[str]:
|
||||
...
|
||||
|
||||
73
typings/numpy/core/arrayprint.pyi
Normal file
73
typings/numpy/core/arrayprint.pyi
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from collections.abc import Callable
|
||||
from typing import Any, Literal, SupportsIndex, TypedDict
|
||||
from contextlib import _GeneratorContextManager
|
||||
from numpy import bool_, clongdouble, complexfloating, datetime64, floating, integer, longdouble, ndarray, timedelta64, void
|
||||
from numpy._typing import _CharLike_co, _FloatLike_co
|
||||
|
||||
_FloatMode = Literal["fixed", "unique", "maxprec", "maxprec_equal"]
|
||||
class _FormatDict(TypedDict, total=False):
|
||||
bool: Callable[[bool_], str]
|
||||
int: Callable[[integer[Any]], str]
|
||||
timedelta: Callable[[timedelta64], str]
|
||||
datetime: Callable[[datetime64], str]
|
||||
float: Callable[[floating[Any]], str]
|
||||
longfloat: Callable[[longdouble], str]
|
||||
complexfloat: Callable[[complexfloating[Any, Any]], str]
|
||||
longcomplexfloat: Callable[[clongdouble], str]
|
||||
void: Callable[[void], str]
|
||||
numpystr: Callable[[_CharLike_co], str]
|
||||
object: Callable[[object], str]
|
||||
all: Callable[[object], str]
|
||||
int_kind: Callable[[integer[Any]], str]
|
||||
float_kind: Callable[[floating[Any]], str]
|
||||
complex_kind: Callable[[complexfloating[Any, Any]], str]
|
||||
str_kind: Callable[[_CharLike_co], str]
|
||||
...
|
||||
|
||||
|
||||
class _FormatOptions(TypedDict):
|
||||
precision: int
|
||||
threshold: int
|
||||
edgeitems: int
|
||||
linewidth: int
|
||||
suppress: bool
|
||||
nanstr: str
|
||||
infstr: str
|
||||
formatter: None | _FormatDict
|
||||
sign: Literal["-", "+", " "]
|
||||
floatmode: _FloatMode
|
||||
legacy: Literal[False, "1.13", "1.21"]
|
||||
...
|
||||
|
||||
|
||||
def set_printoptions(precision: None | SupportsIndex = ..., threshold: None | int = ..., edgeitems: None | int = ..., linewidth: None | int = ..., suppress: None | bool = ..., nanstr: None | str = ..., infstr: None | str = ..., formatter: None | _FormatDict = ..., sign: Literal[None, "-", "+", " "] = ..., floatmode: None | _FloatMode = ..., *, legacy: Literal[None, False, "1.13", "1.21"] = ...) -> None:
|
||||
...
|
||||
|
||||
def get_printoptions() -> _FormatOptions:
|
||||
...
|
||||
|
||||
def array2string(a: ndarray[Any, Any], max_line_width: None | int = ..., precision: None | SupportsIndex = ..., suppress_small: None | bool = ..., separator: str = ..., prefix: str = ..., *, formatter: None | _FormatDict = ..., threshold: None | int = ..., edgeitems: None | int = ..., sign: Literal[None, "-", "+", " "] = ..., floatmode: None | _FloatMode = ..., suffix: str = ..., legacy: Literal[None, False, "1.13", "1.21"] = ...) -> str:
|
||||
...
|
||||
|
||||
def format_float_scientific(x: _FloatLike_co, precision: None | int = ..., unique: bool = ..., trim: Literal["k", ".", "0", "-"] = ..., sign: bool = ..., pad_left: None | int = ..., exp_digits: None | int = ..., min_digits: None | int = ...) -> str:
|
||||
...
|
||||
|
||||
def format_float_positional(x: _FloatLike_co, precision: None | int = ..., unique: bool = ..., fractional: bool = ..., trim: Literal["k", ".", "0", "-"] = ..., sign: bool = ..., pad_left: None | int = ..., pad_right: None | int = ..., min_digits: None | int = ...) -> str:
|
||||
...
|
||||
|
||||
def array_repr(arr: ndarray[Any, Any], max_line_width: None | int = ..., precision: None | SupportsIndex = ..., suppress_small: None | bool = ...) -> str:
|
||||
...
|
||||
|
||||
def array_str(a: ndarray[Any, Any], max_line_width: None | int = ..., precision: None | SupportsIndex = ..., suppress_small: None | bool = ...) -> str:
|
||||
...
|
||||
|
||||
def set_string_function(f: None | Callable[[ndarray[Any, Any]], str], repr: bool = ...) -> None:
|
||||
...
|
||||
|
||||
def printoptions(precision: None | SupportsIndex = ..., threshold: None | int = ..., edgeitems: None | int = ..., linewidth: None | int = ..., suppress: None | bool = ..., nanstr: None | str = ..., infstr: None | str = ..., formatter: None | _FormatDict = ..., sign: Literal[None, "-", "+", " "] = ..., floatmode: None | _FloatMode = ..., *, legacy: Literal[None, False, "1.13", "1.21"] = ...) -> _GeneratorContextManager[_FormatOptions]:
|
||||
...
|
||||
|
||||
375
typings/numpy/core/defchararray.pyi
Normal file
375
typings/numpy/core/defchararray.pyi
Normal file
|
|
@ -0,0 +1,375 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import Any, Literal as L, TypeVar, overload
|
||||
from numpy import _OrderKACF, bool_, bytes_, chararray as chararray, dtype, int_, object_, str_
|
||||
from numpy._typing import NDArray, _ArrayLikeBool_co as b_co, _ArrayLikeBytes_co as S_co, _ArrayLikeInt_co as i_co, _ArrayLikeStr_co as U_co
|
||||
|
||||
_SCT = TypeVar("_SCT", str_, bytes_)
|
||||
_CharArray = chararray[Any, dtype[_SCT]]
|
||||
__all__: list[str]
|
||||
@overload
|
||||
def equal(x1: U_co, x2: U_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def equal(x1: S_co, x2: S_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def not_equal(x1: U_co, x2: U_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def not_equal(x1: S_co, x2: S_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def greater_equal(x1: U_co, x2: U_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def greater_equal(x1: S_co, x2: S_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def less_equal(x1: U_co, x2: U_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def less_equal(x1: S_co, x2: S_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def greater(x1: U_co, x2: U_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def greater(x1: S_co, x2: S_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def less(x1: U_co, x2: U_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def less(x1: S_co, x2: S_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def add(x1: U_co, x2: U_co) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def add(x1: S_co, x2: S_co) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def multiply(a: U_co, i: i_co) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def multiply(a: S_co, i: i_co) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def mod(a: U_co, value: Any) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def mod(a: S_co, value: Any) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def capitalize(a: U_co) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def capitalize(a: S_co) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def center(a: U_co, width: i_co, fillchar: U_co = ...) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def center(a: S_co, width: i_co, fillchar: S_co = ...) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
def decode(a: S_co, encoding: None | str = ..., errors: None | str = ...) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
def encode(a: U_co, encoding: None | str = ..., errors: None | str = ...) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def expandtabs(a: U_co, tabsize: i_co = ...) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def expandtabs(a: S_co, tabsize: i_co = ...) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def join(sep: U_co, seq: U_co) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def join(sep: S_co, seq: S_co) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ljust(a: U_co, width: i_co, fillchar: U_co = ...) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ljust(a: S_co, width: i_co, fillchar: S_co = ...) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def lower(a: U_co) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def lower(a: S_co) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def lstrip(a: U_co, chars: None | U_co = ...) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def lstrip(a: S_co, chars: None | S_co = ...) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def partition(a: U_co, sep: U_co) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def partition(a: S_co, sep: S_co) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def replace(a: U_co, old: U_co, new: U_co, count: None | i_co = ...) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def replace(a: S_co, old: S_co, new: S_co, count: None | i_co = ...) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def rjust(a: U_co, width: i_co, fillchar: U_co = ...) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def rjust(a: S_co, width: i_co, fillchar: S_co = ...) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def rpartition(a: U_co, sep: U_co) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def rpartition(a: S_co, sep: S_co) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def rsplit(a: U_co, sep: None | U_co = ..., maxsplit: None | i_co = ...) -> NDArray[object_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def rsplit(a: S_co, sep: None | S_co = ..., maxsplit: None | i_co = ...) -> NDArray[object_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def rstrip(a: U_co, chars: None | U_co = ...) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def rstrip(a: S_co, chars: None | S_co = ...) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def split(a: U_co, sep: None | U_co = ..., maxsplit: None | i_co = ...) -> NDArray[object_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def split(a: S_co, sep: None | S_co = ..., maxsplit: None | i_co = ...) -> NDArray[object_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def splitlines(a: U_co, keepends: None | b_co = ...) -> NDArray[object_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def splitlines(a: S_co, keepends: None | b_co = ...) -> NDArray[object_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def strip(a: U_co, chars: None | U_co = ...) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def strip(a: S_co, chars: None | S_co = ...) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def swapcase(a: U_co) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def swapcase(a: S_co) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def title(a: U_co) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def title(a: S_co) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def translate(a: U_co, table: U_co, deletechars: None | U_co = ...) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def translate(a: S_co, table: S_co, deletechars: None | S_co = ...) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def upper(a: U_co) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def upper(a: S_co) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def zfill(a: U_co, width: i_co) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def zfill(a: S_co, width: i_co) -> NDArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def count(a: U_co, sub: U_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def count(a: S_co, sub: S_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def endswith(a: U_co, suffix: U_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def endswith(a: S_co, suffix: S_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def find(a: U_co, sub: U_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def find(a: S_co, sub: S_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def index(a: U_co, sub: U_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def index(a: S_co, sub: S_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]:
|
||||
...
|
||||
|
||||
def isalpha(a: U_co | S_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
def isalnum(a: U_co | S_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
def isdecimal(a: U_co | S_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
def isdigit(a: U_co | S_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
def islower(a: U_co | S_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
def isnumeric(a: U_co | S_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
def isspace(a: U_co | S_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
def istitle(a: U_co | S_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
def isupper(a: U_co | S_co) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def rfind(a: U_co, sub: U_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def rfind(a: S_co, sub: S_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def rindex(a: U_co, sub: U_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def rindex(a: S_co, sub: S_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def startswith(a: U_co, prefix: U_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def startswith(a: S_co, prefix: S_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
def str_len(A: U_co | S_co) -> NDArray[int_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def array(obj: U_co, itemsize: None | int = ..., copy: bool = ..., unicode: L[False] = ..., order: _OrderKACF = ...) -> _CharArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def array(obj: S_co, itemsize: None | int = ..., copy: bool = ..., unicode: L[False] = ..., order: _OrderKACF = ...) -> _CharArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def array(obj: object, itemsize: None | int = ..., copy: bool = ..., unicode: L[False] = ..., order: _OrderKACF = ...) -> _CharArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def array(obj: object, itemsize: None | int = ..., copy: bool = ..., unicode: L[True] = ..., order: _OrderKACF = ...) -> _CharArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asarray(obj: U_co, itemsize: None | int = ..., unicode: L[False] = ..., order: _OrderKACF = ...) -> _CharArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asarray(obj: S_co, itemsize: None | int = ..., unicode: L[False] = ..., order: _OrderKACF = ...) -> _CharArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asarray(obj: object, itemsize: None | int = ..., unicode: L[False] = ..., order: _OrderKACF = ...) -> _CharArray[bytes_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asarray(obj: object, itemsize: None | int = ..., unicode: L[True] = ..., order: _OrderKACF = ...) -> _CharArray[str_]:
|
||||
...
|
||||
|
||||
65
typings/numpy/core/einsumfunc.pyi
Normal file
65
typings/numpy/core/einsumfunc.pyi
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from collections.abc import Sequence
|
||||
from typing import Any, Literal, TypeVar, Union, overload
|
||||
from numpy import _OrderKACF, bool_, dtype, ndarray, number
|
||||
from numpy._typing import _ArrayLikeBool_co, _ArrayLikeComplex_co, _ArrayLikeFloat_co, _ArrayLikeInt_co, _ArrayLikeObject_co, _ArrayLikeUInt_co, _DTypeLikeBool, _DTypeLikeComplex, _DTypeLikeComplex_co, _DTypeLikeFloat, _DTypeLikeInt, _DTypeLikeObject, _DTypeLikeUInt
|
||||
|
||||
_ArrayType = TypeVar("_ArrayType", bound=ndarray[Any, dtype[Union[bool_, number[Any]]]])
|
||||
_OptimizeKind = None | bool | Literal["greedy", "optimal"] | Sequence[Any]
|
||||
_CastingSafe = Literal["no", "equiv", "safe", "same_kind"]
|
||||
_CastingUnsafe = Literal["unsafe"]
|
||||
__all__: list[str]
|
||||
@overload
|
||||
def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeBool_co, out: None = ..., dtype: None | _DTypeLikeBool = ..., order: _OrderKACF = ..., casting: _CastingSafe = ..., optimize: _OptimizeKind = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeUInt_co, out: None = ..., dtype: None | _DTypeLikeUInt = ..., order: _OrderKACF = ..., casting: _CastingSafe = ..., optimize: _OptimizeKind = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeInt_co, out: None = ..., dtype: None | _DTypeLikeInt = ..., order: _OrderKACF = ..., casting: _CastingSafe = ..., optimize: _OptimizeKind = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeFloat_co, out: None = ..., dtype: None | _DTypeLikeFloat = ..., order: _OrderKACF = ..., casting: _CastingSafe = ..., optimize: _OptimizeKind = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeComplex_co, out: None = ..., dtype: None | _DTypeLikeComplex = ..., order: _OrderKACF = ..., casting: _CastingSafe = ..., optimize: _OptimizeKind = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: Any, casting: _CastingUnsafe, dtype: None | _DTypeLikeComplex_co = ..., out: None = ..., order: _OrderKACF = ..., optimize: _OptimizeKind = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeComplex_co, out: _ArrayType, dtype: None | _DTypeLikeComplex_co = ..., order: _OrderKACF = ..., casting: _CastingSafe = ..., optimize: _OptimizeKind = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: Any, out: _ArrayType, casting: _CastingUnsafe, dtype: None | _DTypeLikeComplex_co = ..., order: _OrderKACF = ..., optimize: _OptimizeKind = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeObject_co, out: None = ..., dtype: None | _DTypeLikeObject = ..., order: _OrderKACF = ..., casting: _CastingSafe = ..., optimize: _OptimizeKind = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: Any, casting: _CastingUnsafe, dtype: None | _DTypeLikeObject = ..., out: None = ..., order: _OrderKACF = ..., optimize: _OptimizeKind = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeObject_co, out: _ArrayType, dtype: None | _DTypeLikeObject = ..., order: _OrderKACF = ..., casting: _CastingSafe = ..., optimize: _OptimizeKind = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: Any, out: _ArrayType, casting: _CastingUnsafe, dtype: None | _DTypeLikeObject = ..., order: _OrderKACF = ..., optimize: _OptimizeKind = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
def einsum_path(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeComplex_co | _DTypeLikeObject, optimize: _OptimizeKind = ...) -> tuple[list[Any], str]:
|
||||
...
|
||||
|
||||
489
typings/numpy/core/fromnumeric.pyi
Normal file
489
typings/numpy/core/fromnumeric.pyi
Normal file
|
|
@ -0,0 +1,489 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from collections.abc import Sequence
|
||||
from typing import Any, Literal, SupportsIndex, TypeVar, overload
|
||||
from numpy import _CastingKind, _ModeKind, _OrderACF, _OrderKACF, _PartitionKind, _SortKind, _SortSide, bool_, complexfloating, float16, floating, generic, int64, int_, intp, number, object_, uint64
|
||||
from numpy._typing import ArrayLike, DTypeLike, NDArray, _ArrayLike, _ArrayLikeBool_co, _ArrayLikeComplex_co, _ArrayLikeFloat_co, _ArrayLikeInt_co, _ArrayLikeObject_co, _ArrayLikeUInt_co, _BoolLike_co, _ComplexLike_co, _DTypeLike, _IntLike_co, _NumberLike_co, _ScalarLike_co, _Shape, _ShapeLike
|
||||
|
||||
_SCT = TypeVar("_SCT", bound=generic)
|
||||
_SCT_uifcO = TypeVar("_SCT_uifcO", bound=number[Any] | object_)
|
||||
_ArrayType = TypeVar("_ArrayType", bound=NDArray[Any])
|
||||
__all__: list[str]
|
||||
@overload
|
||||
def take(a: _ArrayLike[_SCT], indices: _IntLike_co, axis: None = ..., out: None = ..., mode: _ModeKind = ...) -> _SCT:
|
||||
...
|
||||
|
||||
@overload
|
||||
def take(a: ArrayLike, indices: _IntLike_co, axis: None | SupportsIndex = ..., out: None = ..., mode: _ModeKind = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def take(a: _ArrayLike[_SCT], indices: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., out: None = ..., mode: _ModeKind = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def take(a: ArrayLike, indices: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., out: None = ..., mode: _ModeKind = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def take(a: ArrayLike, indices: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., out: _ArrayType = ..., mode: _ModeKind = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def reshape(a: _ArrayLike[_SCT], newshape: _ShapeLike, order: _OrderACF = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def reshape(a: ArrayLike, newshape: _ShapeLike, order: _OrderACF = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def choose(a: _IntLike_co, choices: ArrayLike, out: None = ..., mode: _ModeKind = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def choose(a: _ArrayLikeInt_co, choices: _ArrayLike[_SCT], out: None = ..., mode: _ModeKind = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def choose(a: _ArrayLikeInt_co, choices: ArrayLike, out: None = ..., mode: _ModeKind = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def choose(a: _ArrayLikeInt_co, choices: ArrayLike, out: _ArrayType = ..., mode: _ModeKind = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def repeat(a: _ArrayLike[_SCT], repeats: _ArrayLikeInt_co, axis: None | SupportsIndex = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def repeat(a: ArrayLike, repeats: _ArrayLikeInt_co, axis: None | SupportsIndex = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
def put(a: NDArray[Any], ind: _ArrayLikeInt_co, v: ArrayLike, mode: _ModeKind = ...) -> None:
|
||||
...
|
||||
|
||||
@overload
|
||||
def swapaxes(a: _ArrayLike[_SCT], axis1: SupportsIndex, axis2: SupportsIndex) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def swapaxes(a: ArrayLike, axis1: SupportsIndex, axis2: SupportsIndex) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def transpose(a: _ArrayLike[_SCT], axes: None | _ShapeLike = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def transpose(a: ArrayLike, axes: None | _ShapeLike = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def partition(a: _ArrayLike[_SCT], kth: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., kind: _PartitionKind = ..., order: None | str | Sequence[str] = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def partition(a: ArrayLike, kth: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., kind: _PartitionKind = ..., order: None | str | Sequence[str] = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
def argpartition(a: ArrayLike, kth: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., kind: _PartitionKind = ..., order: None | str | Sequence[str] = ...) -> NDArray[intp]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def sort(a: _ArrayLike[_SCT], axis: None | SupportsIndex = ..., kind: None | _SortKind = ..., order: None | str | Sequence[str] = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def sort(a: ArrayLike, axis: None | SupportsIndex = ..., kind: None | _SortKind = ..., order: None | str | Sequence[str] = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
def argsort(a: ArrayLike, axis: None | SupportsIndex = ..., kind: None | _SortKind = ..., order: None | str | Sequence[str] = ...) -> NDArray[intp]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def argmax(a: ArrayLike, axis: None = ..., out: None = ..., *, keepdims: Literal[False] = ...) -> intp:
|
||||
...
|
||||
|
||||
@overload
|
||||
def argmax(a: ArrayLike, axis: None | SupportsIndex = ..., out: None = ..., *, keepdims: bool = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def argmax(a: ArrayLike, axis: None | SupportsIndex = ..., out: _ArrayType = ..., *, keepdims: bool = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def argmin(a: ArrayLike, axis: None = ..., out: None = ..., *, keepdims: Literal[False] = ...) -> intp:
|
||||
...
|
||||
|
||||
@overload
|
||||
def argmin(a: ArrayLike, axis: None | SupportsIndex = ..., out: None = ..., *, keepdims: bool = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def argmin(a: ArrayLike, axis: None | SupportsIndex = ..., out: _ArrayType = ..., *, keepdims: bool = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def searchsorted(a: ArrayLike, v: _ScalarLike_co, side: _SortSide = ..., sorter: None | _ArrayLikeInt_co = ...) -> intp:
|
||||
...
|
||||
|
||||
@overload
|
||||
def searchsorted(a: ArrayLike, v: ArrayLike, side: _SortSide = ..., sorter: None | _ArrayLikeInt_co = ...) -> NDArray[intp]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def resize(a: _ArrayLike[_SCT], new_shape: _ShapeLike) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def resize(a: ArrayLike, new_shape: _ShapeLike) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def squeeze(a: _SCT, axis: None | _ShapeLike = ...) -> _SCT:
|
||||
...
|
||||
|
||||
@overload
|
||||
def squeeze(a: _ArrayLike[_SCT], axis: None | _ShapeLike = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def squeeze(a: ArrayLike, axis: None | _ShapeLike = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def diagonal(a: _ArrayLike[_SCT], offset: SupportsIndex = ..., axis1: SupportsIndex = ..., axis2: SupportsIndex = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def diagonal(a: ArrayLike, offset: SupportsIndex = ..., axis1: SupportsIndex = ..., axis2: SupportsIndex = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def trace(a: ArrayLike, offset: SupportsIndex = ..., axis1: SupportsIndex = ..., axis2: SupportsIndex = ..., dtype: DTypeLike = ..., out: None = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def trace(a: ArrayLike, offset: SupportsIndex = ..., axis1: SupportsIndex = ..., axis2: SupportsIndex = ..., dtype: DTypeLike = ..., out: _ArrayType = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ravel(a: _ArrayLike[_SCT], order: _OrderKACF = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ravel(a: ArrayLike, order: _OrderKACF = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
def nonzero(a: ArrayLike) -> tuple[NDArray[intp], ...]:
|
||||
...
|
||||
|
||||
def shape(a: ArrayLike) -> _Shape:
|
||||
...
|
||||
|
||||
@overload
|
||||
def compress(condition: _ArrayLikeBool_co, a: _ArrayLike[_SCT], axis: None | SupportsIndex = ..., out: None = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def compress(condition: _ArrayLikeBool_co, a: ArrayLike, axis: None | SupportsIndex = ..., out: None = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def compress(condition: _ArrayLikeBool_co, a: ArrayLike, axis: None | SupportsIndex = ..., out: _ArrayType = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def clip(a: _SCT, a_min: None | ArrayLike, a_max: None | ArrayLike, out: None = ..., *, dtype: None = ..., where: None | _ArrayLikeBool_co = ..., order: _OrderKACF = ..., subok: bool = ..., signature: str | tuple[None | str, ...] = ..., extobj: list[Any] = ..., casting: _CastingKind = ...) -> _SCT:
|
||||
...
|
||||
|
||||
@overload
|
||||
def clip(a: _ScalarLike_co, a_min: None | ArrayLike, a_max: None | ArrayLike, out: None = ..., *, dtype: None = ..., where: None | _ArrayLikeBool_co = ..., order: _OrderKACF = ..., subok: bool = ..., signature: str | tuple[None | str, ...] = ..., extobj: list[Any] = ..., casting: _CastingKind = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def clip(a: _ArrayLike[_SCT], a_min: None | ArrayLike, a_max: None | ArrayLike, out: None = ..., *, dtype: None = ..., where: None | _ArrayLikeBool_co = ..., order: _OrderKACF = ..., subok: bool = ..., signature: str | tuple[None | str, ...] = ..., extobj: list[Any] = ..., casting: _CastingKind = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def clip(a: ArrayLike, a_min: None | ArrayLike, a_max: None | ArrayLike, out: None = ..., *, dtype: None = ..., where: None | _ArrayLikeBool_co = ..., order: _OrderKACF = ..., subok: bool = ..., signature: str | tuple[None | str, ...] = ..., extobj: list[Any] = ..., casting: _CastingKind = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def clip(a: ArrayLike, a_min: None | ArrayLike, a_max: None | ArrayLike, out: _ArrayType = ..., *, dtype: DTypeLike, where: None | _ArrayLikeBool_co = ..., order: _OrderKACF = ..., subok: bool = ..., signature: str | tuple[None | str, ...] = ..., extobj: list[Any] = ..., casting: _CastingKind = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def clip(a: ArrayLike, a_min: None | ArrayLike, a_max: None | ArrayLike, out: _ArrayType, *, dtype: DTypeLike = ..., where: None | _ArrayLikeBool_co = ..., order: _OrderKACF = ..., subok: bool = ..., signature: str | tuple[None | str, ...] = ..., extobj: list[Any] = ..., casting: _CastingKind = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def sum(a: _ArrayLike[_SCT], axis: None = ..., dtype: None = ..., out: None = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _SCT:
|
||||
...
|
||||
|
||||
@overload
|
||||
def sum(a: ArrayLike, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: None = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def sum(a: ArrayLike, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _ArrayType = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def all(a: ArrayLike, axis: None = ..., out: None = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> bool_:
|
||||
...
|
||||
|
||||
@overload
|
||||
def all(a: ArrayLike, axis: None | _ShapeLike = ..., out: None = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def all(a: ArrayLike, axis: None | _ShapeLike = ..., out: _ArrayType = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def any(a: ArrayLike, axis: None = ..., out: None = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> bool_:
|
||||
...
|
||||
|
||||
@overload
|
||||
def any(a: ArrayLike, axis: None | _ShapeLike = ..., out: None = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def any(a: ArrayLike, axis: None | _ShapeLike = ..., out: _ArrayType = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cumsum(a: _ArrayLike[_SCT], axis: None | SupportsIndex = ..., dtype: None = ..., out: None = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cumsum(a: ArrayLike, axis: None | SupportsIndex = ..., dtype: None = ..., out: None = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cumsum(a: ArrayLike, axis: None | SupportsIndex = ..., dtype: _DTypeLike[_SCT] = ..., out: None = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cumsum(a: ArrayLike, axis: None | SupportsIndex = ..., dtype: DTypeLike = ..., out: None = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cumsum(a: ArrayLike, axis: None | SupportsIndex = ..., dtype: DTypeLike = ..., out: _ArrayType = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ptp(a: _ArrayLike[_SCT], axis: None = ..., out: None = ..., keepdims: Literal[False] = ...) -> _SCT:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ptp(a: ArrayLike, axis: None | _ShapeLike = ..., out: None = ..., keepdims: bool = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ptp(a: ArrayLike, axis: None | _ShapeLike = ..., out: _ArrayType = ..., keepdims: bool = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def amax(a: _ArrayLike[_SCT], axis: None = ..., out: None = ..., keepdims: Literal[False] = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _SCT:
|
||||
...
|
||||
|
||||
@overload
|
||||
def amax(a: ArrayLike, axis: None | _ShapeLike = ..., out: None = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def amax(a: ArrayLike, axis: None | _ShapeLike = ..., out: _ArrayType = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def amin(a: _ArrayLike[_SCT], axis: None = ..., out: None = ..., keepdims: Literal[False] = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _SCT:
|
||||
...
|
||||
|
||||
@overload
|
||||
def amin(a: ArrayLike, axis: None | _ShapeLike = ..., out: None = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def amin(a: ArrayLike, axis: None | _ShapeLike = ..., out: _ArrayType = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def prod(a: _ArrayLikeBool_co, axis: None = ..., dtype: None = ..., out: None = ..., keepdims: Literal[False] = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> int_:
|
||||
...
|
||||
|
||||
@overload
|
||||
def prod(a: _ArrayLikeUInt_co, axis: None = ..., dtype: None = ..., out: None = ..., keepdims: Literal[False] = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> uint64:
|
||||
...
|
||||
|
||||
@overload
|
||||
def prod(a: _ArrayLikeInt_co, axis: None = ..., dtype: None = ..., out: None = ..., keepdims: Literal[False] = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> int64:
|
||||
...
|
||||
|
||||
@overload
|
||||
def prod(a: _ArrayLikeFloat_co, axis: None = ..., dtype: None = ..., out: None = ..., keepdims: Literal[False] = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> floating[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def prod(a: _ArrayLikeComplex_co, axis: None = ..., dtype: None = ..., out: None = ..., keepdims: Literal[False] = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> complexfloating[Any, Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def prod(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: None = ..., out: None = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def prod(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None = ..., dtype: _DTypeLike[_SCT] = ..., out: None = ..., keepdims: Literal[False] = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _SCT:
|
||||
...
|
||||
|
||||
@overload
|
||||
def prod(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: None | DTypeLike = ..., out: None = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def prod(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: None | DTypeLike = ..., out: _ArrayType = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cumprod(a: _ArrayLikeBool_co, axis: None | SupportsIndex = ..., dtype: None = ..., out: None = ...) -> NDArray[int_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cumprod(a: _ArrayLikeUInt_co, axis: None | SupportsIndex = ..., dtype: None = ..., out: None = ...) -> NDArray[uint64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cumprod(a: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., dtype: None = ..., out: None = ...) -> NDArray[int64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cumprod(a: _ArrayLikeFloat_co, axis: None | SupportsIndex = ..., dtype: None = ..., out: None = ...) -> NDArray[floating[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cumprod(a: _ArrayLikeComplex_co, axis: None | SupportsIndex = ..., dtype: None = ..., out: None = ...) -> NDArray[complexfloating[Any, Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cumprod(a: _ArrayLikeObject_co, axis: None | SupportsIndex = ..., dtype: None = ..., out: None = ...) -> NDArray[object_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cumprod(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | SupportsIndex = ..., dtype: _DTypeLike[_SCT] = ..., out: None = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cumprod(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | SupportsIndex = ..., dtype: DTypeLike = ..., out: None = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cumprod(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | SupportsIndex = ..., dtype: DTypeLike = ..., out: _ArrayType = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
def ndim(a: ArrayLike) -> int:
|
||||
...
|
||||
|
||||
def size(a: ArrayLike, axis: None | int = ...) -> int:
|
||||
...
|
||||
|
||||
@overload
|
||||
def around(a: _BoolLike_co, decimals: SupportsIndex = ..., out: None = ...) -> float16:
|
||||
...
|
||||
|
||||
@overload
|
||||
def around(a: _SCT_uifcO, decimals: SupportsIndex = ..., out: None = ...) -> _SCT_uifcO:
|
||||
...
|
||||
|
||||
@overload
|
||||
def around(a: _ComplexLike_co | object_, decimals: SupportsIndex = ..., out: None = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def around(a: _ArrayLikeBool_co, decimals: SupportsIndex = ..., out: None = ...) -> NDArray[float16]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def around(a: _ArrayLike[_SCT_uifcO], decimals: SupportsIndex = ..., out: None = ...) -> NDArray[_SCT_uifcO]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def around(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, decimals: SupportsIndex = ..., out: None = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def around(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, decimals: SupportsIndex = ..., out: _ArrayType = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def mean(a: _ArrayLikeFloat_co, axis: None = ..., dtype: None = ..., out: None = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> floating[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def mean(a: _ArrayLikeComplex_co, axis: None = ..., dtype: None = ..., out: None = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> complexfloating[Any, Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def mean(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: None = ..., out: None = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def mean(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None = ..., dtype: _DTypeLike[_SCT] = ..., out: None = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> _SCT:
|
||||
...
|
||||
|
||||
@overload
|
||||
def mean(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: None = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def mean(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _ArrayType = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def std(a: _ArrayLikeComplex_co, axis: None = ..., dtype: None = ..., out: None = ..., ddof: float = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> floating[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def std(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: None = ..., out: None = ..., ddof: float = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def std(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None = ..., dtype: _DTypeLike[_SCT] = ..., out: None = ..., ddof: float = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> _SCT:
|
||||
...
|
||||
|
||||
@overload
|
||||
def std(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: None = ..., ddof: float = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def std(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _ArrayType = ..., ddof: float = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def var(a: _ArrayLikeComplex_co, axis: None = ..., dtype: None = ..., out: None = ..., ddof: float = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> floating[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def var(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: None = ..., out: None = ..., ddof: float = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def var(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None = ..., dtype: _DTypeLike[_SCT] = ..., out: None = ..., ddof: float = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> _SCT:
|
||||
...
|
||||
|
||||
@overload
|
||||
def var(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: None = ..., ddof: float = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def var(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _ArrayType = ..., ddof: float = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
max = ...
|
||||
min = ...
|
||||
round = ...
|
||||
77
typings/numpy/core/function_base.pyi
Normal file
77
typings/numpy/core/function_base.pyi
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import Any, Literal as L, SupportsIndex, TypeVar, overload
|
||||
from numpy import complexfloating, floating, generic
|
||||
from numpy._typing import DTypeLike, NDArray, _ArrayLikeComplex_co, _ArrayLikeFloat_co, _DTypeLike
|
||||
|
||||
_SCT = TypeVar("_SCT", bound=generic)
|
||||
__all__: list[str]
|
||||
@overload
|
||||
def linspace(start: _ArrayLikeFloat_co, stop: _ArrayLikeFloat_co, num: SupportsIndex = ..., endpoint: bool = ..., retstep: L[False] = ..., dtype: None = ..., axis: SupportsIndex = ...) -> NDArray[floating[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def linspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., retstep: L[False] = ..., dtype: None = ..., axis: SupportsIndex = ...) -> NDArray[complexfloating[Any, Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def linspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., retstep: L[False] = ..., dtype: _DTypeLike[_SCT] = ..., axis: SupportsIndex = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def linspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., retstep: L[False] = ..., dtype: DTypeLike = ..., axis: SupportsIndex = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def linspace(start: _ArrayLikeFloat_co, stop: _ArrayLikeFloat_co, num: SupportsIndex = ..., endpoint: bool = ..., retstep: L[True] = ..., dtype: None = ..., axis: SupportsIndex = ...) -> tuple[NDArray[floating[Any]], floating[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def linspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., retstep: L[True] = ..., dtype: None = ..., axis: SupportsIndex = ...) -> tuple[NDArray[complexfloating[Any, Any]], complexfloating[Any, Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def linspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., retstep: L[True] = ..., dtype: _DTypeLike[_SCT] = ..., axis: SupportsIndex = ...) -> tuple[NDArray[_SCT], _SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def linspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., retstep: L[True] = ..., dtype: DTypeLike = ..., axis: SupportsIndex = ...) -> tuple[NDArray[Any], Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def logspace(start: _ArrayLikeFloat_co, stop: _ArrayLikeFloat_co, num: SupportsIndex = ..., endpoint: bool = ..., base: _ArrayLikeFloat_co = ..., dtype: None = ..., axis: SupportsIndex = ...) -> NDArray[floating[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def logspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., base: _ArrayLikeComplex_co = ..., dtype: None = ..., axis: SupportsIndex = ...) -> NDArray[complexfloating[Any, Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def logspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., base: _ArrayLikeComplex_co = ..., dtype: _DTypeLike[_SCT] = ..., axis: SupportsIndex = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def logspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., base: _ArrayLikeComplex_co = ..., dtype: DTypeLike = ..., axis: SupportsIndex = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def geomspace(start: _ArrayLikeFloat_co, stop: _ArrayLikeFloat_co, num: SupportsIndex = ..., endpoint: bool = ..., dtype: None = ..., axis: SupportsIndex = ...) -> NDArray[floating[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def geomspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., dtype: None = ..., axis: SupportsIndex = ...) -> NDArray[complexfloating[Any, Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def geomspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., dtype: _DTypeLike[_SCT] = ..., axis: SupportsIndex = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def geomspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., dtype: DTypeLike = ..., axis: SupportsIndex = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
def add_newdoc(place: str, obj: str, doc: str | tuple[str, str] | list[tuple[str, str]], warn_on_python: bool = ...) -> None:
|
||||
...
|
||||
|
||||
521
typings/numpy/core/multiarray.pyi
Normal file
521
typings/numpy/core/multiarray.pyi
Normal file
|
|
@ -0,0 +1,521 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import os
|
||||
import datetime as dt
|
||||
from collections.abc import Callable, Iterable, Sequence
|
||||
from typing import Any, ClassVar, Final, Literal as L, Protocol, SupportsIndex, TypeVar, final, overload
|
||||
from numpy import _CastingKind, _CopyMode, _IOProtocol, _ModeKind, _NDIterFlagsKind, _NDIterOpFlagsKind, _OrderCF, _OrderKACF, _SupportsBuffer, bool_, busdaycalendar as busdaycalendar, complexfloating, datetime64, dtype as dtype, float64, floating, generic, int_, intp, nditer as nditer, signedinteger, str_, timedelta64, ufunc, uint8, unsignedinteger
|
||||
from numpy._typing import ArrayLike, DTypeLike, NDArray, _ArrayLike, _ArrayLikeBool_co, _ArrayLikeBytes_co, _ArrayLikeComplex_co, _ArrayLikeDT64_co, _ArrayLikeFloat_co, _ArrayLikeInt_co, _ArrayLikeObject_co, _ArrayLikeStr_co, _ArrayLikeTD64_co, _ArrayLikeUInt_co, _DTypeLike, _FloatLike_co, _IntLike_co, _NestedSequence, _ScalarLike_co, _ShapeLike, _SupportsArrayFunc, _TD64Like_co
|
||||
|
||||
_T_co = TypeVar("_T_co", covariant=True)
|
||||
_T_contra = TypeVar("_T_contra", contravariant=True)
|
||||
_SCT = TypeVar("_SCT", bound=generic)
|
||||
_ArrayType = TypeVar("_ArrayType", bound=NDArray[Any])
|
||||
_UnitKind = L["Y", "M", "D", "h", "m", "s", "ms", "us", "μs", "ns", "ps", "fs", "as",]
|
||||
_RollKind = L["nat", "forward", "following", "backward", "preceding", "modifiedfollowing", "modifiedpreceding",]
|
||||
class _SupportsLenAndGetItem(Protocol[_T_contra, _T_co]):
|
||||
def __len__(self) -> int:
|
||||
...
|
||||
|
||||
def __getitem__(self, key: _T_contra, /) -> _T_co:
|
||||
...
|
||||
|
||||
|
||||
|
||||
__all__: list[str]
|
||||
ALLOW_THREADS: Final[int]
|
||||
BUFSIZE: L[8192]
|
||||
CLIP: L[0]
|
||||
WRAP: L[1]
|
||||
RAISE: L[2]
|
||||
MAXDIMS: L[32]
|
||||
MAY_SHARE_BOUNDS: L[0]
|
||||
MAY_SHARE_EXACT: L[-1]
|
||||
tracemalloc_domain: L[389047]
|
||||
@overload
|
||||
def empty_like(prototype: _ArrayType, dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def empty_like(prototype: _ArrayLike[_SCT], dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def empty_like(prototype: object, dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def empty_like(prototype: Any, dtype: _DTypeLike[_SCT], order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def empty_like(prototype: Any, dtype: DTypeLike, order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def array(object: _ArrayType, dtype: None = ..., *, copy: bool | _CopyMode = ..., order: _OrderKACF = ..., subok: L[True], ndmin: int = ..., like: None | _SupportsArrayFunc = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def array(object: _ArrayLike[_SCT], dtype: None = ..., *, copy: bool | _CopyMode = ..., order: _OrderKACF = ..., subok: bool = ..., ndmin: int = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def array(object: object, dtype: None = ..., *, copy: bool | _CopyMode = ..., order: _OrderKACF = ..., subok: bool = ..., ndmin: int = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def array(object: Any, dtype: _DTypeLike[_SCT], *, copy: bool | _CopyMode = ..., order: _OrderKACF = ..., subok: bool = ..., ndmin: int = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def array(object: Any, dtype: DTypeLike, *, copy: bool | _CopyMode = ..., order: _OrderKACF = ..., subok: bool = ..., ndmin: int = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def zeros(shape: _ShapeLike, dtype: None = ..., order: _OrderCF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[float64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def zeros(shape: _ShapeLike, dtype: _DTypeLike[_SCT], order: _OrderCF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def zeros(shape: _ShapeLike, dtype: DTypeLike, order: _OrderCF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def empty(shape: _ShapeLike, dtype: None = ..., order: _OrderCF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[float64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def empty(shape: _ShapeLike, dtype: _DTypeLike[_SCT], order: _OrderCF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def empty(shape: _ShapeLike, dtype: DTypeLike, order: _OrderCF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def unravel_index(indices: _IntLike_co, shape: _ShapeLike, order: _OrderCF = ...) -> tuple[intp, ...]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def unravel_index(indices: _ArrayLikeInt_co, shape: _ShapeLike, order: _OrderCF = ...) -> tuple[NDArray[intp], ...]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ravel_multi_index(multi_index: Sequence[_IntLike_co], dims: Sequence[SupportsIndex], mode: _ModeKind | tuple[_ModeKind, ...] = ..., order: _OrderCF = ...) -> intp:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ravel_multi_index(multi_index: Sequence[_ArrayLikeInt_co], dims: Sequence[SupportsIndex], mode: _ModeKind | tuple[_ModeKind, ...] = ..., order: _OrderCF = ...) -> NDArray[intp]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def concatenate(arrays: _ArrayLike[_SCT], /, axis: None | SupportsIndex = ..., out: None = ..., *, dtype: None = ..., casting: None | _CastingKind = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def concatenate(arrays: _SupportsLenAndGetItem[int, ArrayLike], /, axis: None | SupportsIndex = ..., out: None = ..., *, dtype: None = ..., casting: None | _CastingKind = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def concatenate(arrays: _SupportsLenAndGetItem[int, ArrayLike], /, axis: None | SupportsIndex = ..., out: None = ..., *, dtype: _DTypeLike[_SCT], casting: None | _CastingKind = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def concatenate(arrays: _SupportsLenAndGetItem[int, ArrayLike], /, axis: None | SupportsIndex = ..., out: None = ..., *, dtype: DTypeLike, casting: None | _CastingKind = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def concatenate(arrays: _SupportsLenAndGetItem[int, ArrayLike], /, axis: None | SupportsIndex = ..., out: _ArrayType = ..., *, dtype: DTypeLike = ..., casting: None | _CastingKind = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
def inner(a: ArrayLike, b: ArrayLike, /) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def where(condition: ArrayLike, /) -> tuple[NDArray[intp], ...]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def where(condition: ArrayLike, x: ArrayLike, y: ArrayLike, /) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
def lexsort(keys: ArrayLike, axis: None | SupportsIndex = ...) -> Any:
|
||||
...
|
||||
|
||||
def can_cast(from_: ArrayLike | DTypeLike, to: DTypeLike, casting: None | _CastingKind = ...) -> bool:
|
||||
...
|
||||
|
||||
def min_scalar_type(a: ArrayLike, /) -> dtype[Any]:
|
||||
...
|
||||
|
||||
def result_type(*arrays_and_dtypes: ArrayLike | DTypeLike) -> dtype[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def dot(a: ArrayLike, b: ArrayLike, out: None = ...) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def dot(a: ArrayLike, b: ArrayLike, out: _ArrayType) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def vdot(a: _ArrayLikeBool_co, b: _ArrayLikeBool_co, /) -> bool_:
|
||||
...
|
||||
|
||||
@overload
|
||||
def vdot(a: _ArrayLikeUInt_co, b: _ArrayLikeUInt_co, /) -> unsignedinteger[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def vdot(a: _ArrayLikeInt_co, b: _ArrayLikeInt_co, /) -> signedinteger[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def vdot(a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co, /) -> floating[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def vdot(a: _ArrayLikeComplex_co, b: _ArrayLikeComplex_co, /) -> complexfloating[Any, Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def vdot(a: _ArrayLikeTD64_co, b: _ArrayLikeTD64_co, /) -> timedelta64:
|
||||
...
|
||||
|
||||
@overload
|
||||
def vdot(a: _ArrayLikeObject_co, b: Any, /) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def vdot(a: Any, b: _ArrayLikeObject_co, /) -> Any:
|
||||
...
|
||||
|
||||
def bincount(x: ArrayLike, /, weights: None | ArrayLike = ..., minlength: SupportsIndex = ...) -> NDArray[intp]:
|
||||
...
|
||||
|
||||
def copyto(dst: NDArray[Any], src: ArrayLike, casting: None | _CastingKind = ..., where: None | _ArrayLikeBool_co = ...) -> None:
|
||||
...
|
||||
|
||||
def putmask(a: NDArray[Any], /, mask: _ArrayLikeBool_co, values: ArrayLike) -> None:
|
||||
...
|
||||
|
||||
def packbits(a: _ArrayLikeInt_co, /, axis: None | SupportsIndex = ..., bitorder: L["big", "little"] = ...) -> NDArray[uint8]:
|
||||
...
|
||||
|
||||
def unpackbits(a: _ArrayLike[uint8], /, axis: None | SupportsIndex = ..., count: None | SupportsIndex = ..., bitorder: L["big", "little"] = ...) -> NDArray[uint8]:
|
||||
...
|
||||
|
||||
def shares_memory(a: object, b: object, /, max_work: None | int = ...) -> bool:
|
||||
...
|
||||
|
||||
def may_share_memory(a: object, b: object, /, max_work: None | int = ...) -> bool:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asarray(a: _ArrayLike[_SCT], dtype: None = ..., order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asarray(a: object, dtype: None = ..., order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asarray(a: Any, dtype: _DTypeLike[_SCT], order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asarray(a: Any, dtype: DTypeLike, order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asanyarray(a: _ArrayType, dtype: None = ..., order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asanyarray(a: _ArrayLike[_SCT], dtype: None = ..., order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asanyarray(a: object, dtype: None = ..., order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asanyarray(a: Any, dtype: _DTypeLike[_SCT], order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asanyarray(a: Any, dtype: DTypeLike, order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ascontiguousarray(a: _ArrayLike[_SCT], dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ascontiguousarray(a: object, dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ascontiguousarray(a: Any, dtype: _DTypeLike[_SCT], *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ascontiguousarray(a: Any, dtype: DTypeLike, *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asfortranarray(a: _ArrayLike[_SCT], dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asfortranarray(a: object, dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asfortranarray(a: Any, dtype: _DTypeLike[_SCT], *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def asfortranarray(a: Any, dtype: DTypeLike, *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
def geterrobj() -> list[Any]:
|
||||
...
|
||||
|
||||
def seterrobj(errobj: list[Any], /) -> None:
|
||||
...
|
||||
|
||||
def promote_types(__type1: DTypeLike, __type2: DTypeLike) -> dtype[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def fromstring(string: str | bytes, dtype: None = ..., count: SupportsIndex = ..., *, sep: str, like: None | _SupportsArrayFunc = ...) -> NDArray[float64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def fromstring(string: str | bytes, dtype: _DTypeLike[_SCT], count: SupportsIndex = ..., *, sep: str, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def fromstring(string: str | bytes, dtype: DTypeLike, count: SupportsIndex = ..., *, sep: str, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
def frompyfunc(func: Callable[..., Any], /, nin: SupportsIndex, nout: SupportsIndex, *, identity: Any = ...) -> ufunc:
|
||||
...
|
||||
|
||||
@overload
|
||||
def fromfile(file: str | bytes | os.PathLike[Any] | _IOProtocol, dtype: None = ..., count: SupportsIndex = ..., sep: str = ..., offset: SupportsIndex = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[float64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def fromfile(file: str | bytes | os.PathLike[Any] | _IOProtocol, dtype: _DTypeLike[_SCT], count: SupportsIndex = ..., sep: str = ..., offset: SupportsIndex = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def fromfile(file: str | bytes | os.PathLike[Any] | _IOProtocol, dtype: DTypeLike, count: SupportsIndex = ..., sep: str = ..., offset: SupportsIndex = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def fromiter(iter: Iterable[Any], dtype: _DTypeLike[_SCT], count: SupportsIndex = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def fromiter(iter: Iterable[Any], dtype: DTypeLike, count: SupportsIndex = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def frombuffer(buffer: _SupportsBuffer, dtype: None = ..., count: SupportsIndex = ..., offset: SupportsIndex = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[float64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def frombuffer(buffer: _SupportsBuffer, dtype: _DTypeLike[_SCT], count: SupportsIndex = ..., offset: SupportsIndex = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def frombuffer(buffer: _SupportsBuffer, dtype: DTypeLike, count: SupportsIndex = ..., offset: SupportsIndex = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def arange(stop: _IntLike_co, /, *, dtype: None = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[signedinteger[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def arange(start: _IntLike_co, stop: _IntLike_co, step: _IntLike_co = ..., dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[signedinteger[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def arange(stop: _FloatLike_co, /, *, dtype: None = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[floating[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def arange(start: _FloatLike_co, stop: _FloatLike_co, step: _FloatLike_co = ..., dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[floating[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def arange(stop: _TD64Like_co, /, *, dtype: None = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[timedelta64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def arange(start: _TD64Like_co, stop: _TD64Like_co, step: _TD64Like_co = ..., dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[timedelta64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def arange(start: datetime64, stop: datetime64, step: datetime64 = ..., dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[datetime64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def arange(stop: Any, /, *, dtype: _DTypeLike[_SCT], like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def arange(start: Any, stop: Any, step: Any = ..., dtype: _DTypeLike[_SCT] = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def arange(stop: Any, /, *, dtype: DTypeLike, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def arange(start: Any, stop: Any, step: Any = ..., dtype: DTypeLike = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
def datetime_data(dtype: str | _DTypeLike[datetime64] | _DTypeLike[timedelta64], /) -> tuple[str, int]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def busday_count(begindates: _ScalarLike_co | dt.date, enddates: _ScalarLike_co | dt.date, weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: None = ...) -> int_:
|
||||
...
|
||||
|
||||
@overload
|
||||
def busday_count(begindates: ArrayLike | dt.date | _NestedSequence[dt.date], enddates: ArrayLike | dt.date | _NestedSequence[dt.date], weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: None = ...) -> NDArray[int_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def busday_count(begindates: ArrayLike | dt.date | _NestedSequence[dt.date], enddates: ArrayLike | dt.date | _NestedSequence[dt.date], weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: _ArrayType = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def busday_offset(dates: datetime64 | dt.date, offsets: _TD64Like_co | dt.timedelta, roll: L["raise"] = ..., weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: None = ...) -> datetime64:
|
||||
...
|
||||
|
||||
@overload
|
||||
def busday_offset(dates: _ArrayLike[datetime64] | dt.date | _NestedSequence[dt.date], offsets: _ArrayLikeTD64_co | dt.timedelta | _NestedSequence[dt.timedelta], roll: L["raise"] = ..., weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: None = ...) -> NDArray[datetime64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def busday_offset(dates: _ArrayLike[datetime64] | dt.date | _NestedSequence[dt.date], offsets: _ArrayLikeTD64_co | dt.timedelta | _NestedSequence[dt.timedelta], roll: L["raise"] = ..., weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: _ArrayType = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def busday_offset(dates: _ScalarLike_co | dt.date, offsets: _ScalarLike_co | dt.timedelta, roll: _RollKind, weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: None = ...) -> datetime64:
|
||||
...
|
||||
|
||||
@overload
|
||||
def busday_offset(dates: ArrayLike | dt.date | _NestedSequence[dt.date], offsets: ArrayLike | dt.timedelta | _NestedSequence[dt.timedelta], roll: _RollKind, weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: None = ...) -> NDArray[datetime64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def busday_offset(dates: ArrayLike | dt.date | _NestedSequence[dt.date], offsets: ArrayLike | dt.timedelta | _NestedSequence[dt.timedelta], roll: _RollKind, weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: _ArrayType = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def is_busday(dates: _ScalarLike_co | dt.date, weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: None = ...) -> bool_:
|
||||
...
|
||||
|
||||
@overload
|
||||
def is_busday(dates: ArrayLike | _NestedSequence[dt.date], weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: None = ...) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def is_busday(dates: ArrayLike | _NestedSequence[dt.date], weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: _ArrayType = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def datetime_as_string(arr: datetime64 | dt.date, unit: None | L["auto"] | _UnitKind = ..., timezone: L["naive", "UTC", "local"] | dt.tzinfo = ..., casting: _CastingKind = ...) -> str_:
|
||||
...
|
||||
|
||||
@overload
|
||||
def datetime_as_string(arr: _ArrayLikeDT64_co | _NestedSequence[dt.date], unit: None | L["auto"] | _UnitKind = ..., timezone: L["naive", "UTC", "local"] | dt.tzinfo = ..., casting: _CastingKind = ...) -> NDArray[str_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def compare_chararrays(a1: _ArrayLikeStr_co, a2: _ArrayLikeStr_co, cmp: L["<", "<=", "==", ">=", ">", "!="], rstrip: bool) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def compare_chararrays(a1: _ArrayLikeBytes_co, a2: _ArrayLikeBytes_co, cmp: L["<", "<=", "==", ">=", ">", "!="], rstrip: bool) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
def add_docstring(obj: Callable[..., Any], docstring: str, /) -> None:
|
||||
...
|
||||
|
||||
_GetItemKeys = L["C", "CONTIGUOUS", "C_CONTIGUOUS", "F", "FORTRAN", "F_CONTIGUOUS", "W", "WRITEABLE", "B", "BEHAVED", "O", "OWNDATA", "A", "ALIGNED", "X", "WRITEBACKIFCOPY", "CA", "CARRAY", "FA", "FARRAY", "FNC", "FORC",]
|
||||
_SetItemKeys = L["A", "ALIGNED", "W", "WRITEABLE", "X", "WRITEBACKIFCOPY",]
|
||||
@final
|
||||
class flagsobj:
|
||||
__hash__: ClassVar[None]
|
||||
aligned: bool
|
||||
writeable: bool
|
||||
writebackifcopy: bool
|
||||
@property
|
||||
def behaved(self) -> bool:
|
||||
...
|
||||
|
||||
@property
|
||||
def c_contiguous(self) -> bool:
|
||||
...
|
||||
|
||||
@property
|
||||
def carray(self) -> bool:
|
||||
...
|
||||
|
||||
@property
|
||||
def contiguous(self) -> bool:
|
||||
...
|
||||
|
||||
@property
|
||||
def f_contiguous(self) -> bool:
|
||||
...
|
||||
|
||||
@property
|
||||
def farray(self) -> bool:
|
||||
...
|
||||
|
||||
@property
|
||||
def fnc(self) -> bool:
|
||||
...
|
||||
|
||||
@property
|
||||
def forc(self) -> bool:
|
||||
...
|
||||
|
||||
@property
|
||||
def fortran(self) -> bool:
|
||||
...
|
||||
|
||||
@property
|
||||
def num(self) -> int:
|
||||
...
|
||||
|
||||
@property
|
||||
def owndata(self) -> bool:
|
||||
...
|
||||
|
||||
def __getitem__(self, key: _GetItemKeys) -> bool:
|
||||
...
|
||||
|
||||
def __setitem__(self, key: _SetItemKeys, value: bool) -> None:
|
||||
...
|
||||
|
||||
|
||||
|
||||
def nested_iters(op: ArrayLike | Sequence[ArrayLike], axes: Sequence[Sequence[SupportsIndex]], flags: None | Sequence[_NDIterFlagsKind] = ..., op_flags: None | Sequence[Sequence[_NDIterOpFlagsKind]] = ..., op_dtypes: DTypeLike | Sequence[DTypeLike] = ..., order: _OrderKACF = ..., casting: _CastingKind = ..., buffersize: SupportsIndex = ...) -> tuple[nditer, ...]:
|
||||
...
|
||||
|
||||
359
typings/numpy/core/numeric.pyi
Normal file
359
typings/numpy/core/numeric.pyi
Normal file
|
|
@ -0,0 +1,359 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from collections.abc import Callable, Sequence
|
||||
from typing import Any, Literal, NoReturn, SupportsAbs, SupportsIndex, TypeGuard, TypeVar, overload
|
||||
from typing_extensions import TypeGuard
|
||||
from numpy import _OrderCF, _OrderKACF, bool_, complexfloating, float64, floating, generic, int_, intp, object_, signedinteger, timedelta64, unsignedinteger
|
||||
from numpy._typing import ArrayLike, DTypeLike, NDArray, _ArrayLike, _ArrayLikeBool_co, _ArrayLikeComplex_co, _ArrayLikeFloat_co, _ArrayLikeInt_co, _ArrayLikeObject_co, _ArrayLikeTD64_co, _ArrayLikeUInt_co, _ArrayLikeUnknown, _DTypeLike, _ScalarLike_co, _ShapeLike, _SupportsArrayFunc
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
...
|
||||
else:
|
||||
...
|
||||
_T = TypeVar("_T")
|
||||
_SCT = TypeVar("_SCT", bound=generic)
|
||||
_ArrayType = TypeVar("_ArrayType", bound=NDArray[Any])
|
||||
_CorrelateMode = Literal["valid", "same", "full"]
|
||||
__all__: list[str]
|
||||
@overload
|
||||
def zeros_like(a: _ArrayType, dtype: None = ..., order: _OrderKACF = ..., subok: Literal[True] = ..., shape: None = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def zeros_like(a: _ArrayLike[_SCT], dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def zeros_like(a: object, dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def zeros_like(a: Any, dtype: _DTypeLike[_SCT], order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def zeros_like(a: Any, dtype: DTypeLike, order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ones(shape: _ShapeLike, dtype: None = ..., order: _OrderCF = ..., *, like: _SupportsArrayFunc = ...) -> NDArray[float64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ones(shape: _ShapeLike, dtype: _DTypeLike[_SCT], order: _OrderCF = ..., *, like: _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ones(shape: _ShapeLike, dtype: DTypeLike, order: _OrderCF = ..., *, like: _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ones_like(a: _ArrayType, dtype: None = ..., order: _OrderKACF = ..., subok: Literal[True] = ..., shape: None = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ones_like(a: _ArrayLike[_SCT], dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ones_like(a: object, dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ones_like(a: Any, dtype: _DTypeLike[_SCT], order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def ones_like(a: Any, dtype: DTypeLike, order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def full(shape: _ShapeLike, fill_value: Any, dtype: None = ..., order: _OrderCF = ..., *, like: _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def full(shape: _ShapeLike, fill_value: Any, dtype: _DTypeLike[_SCT], order: _OrderCF = ..., *, like: _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def full(shape: _ShapeLike, fill_value: Any, dtype: DTypeLike, order: _OrderCF = ..., *, like: _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def full_like(a: _ArrayType, fill_value: Any, dtype: None = ..., order: _OrderKACF = ..., subok: Literal[True] = ..., shape: None = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def full_like(a: _ArrayLike[_SCT], fill_value: Any, dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def full_like(a: object, fill_value: Any, dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def full_like(a: Any, fill_value: Any, dtype: _DTypeLike[_SCT], order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def full_like(a: Any, fill_value: Any, dtype: DTypeLike, order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def count_nonzero(a: ArrayLike, axis: None = ..., *, keepdims: Literal[False] = ...) -> int:
|
||||
...
|
||||
|
||||
@overload
|
||||
def count_nonzero(a: ArrayLike, axis: _ShapeLike = ..., *, keepdims: bool = ...) -> Any:
|
||||
...
|
||||
|
||||
def isfortran(a: NDArray[Any] | generic) -> bool:
|
||||
...
|
||||
|
||||
def argwhere(a: ArrayLike) -> NDArray[intp]:
|
||||
...
|
||||
|
||||
def flatnonzero(a: ArrayLike) -> NDArray[intp]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def correlate(a: _ArrayLikeUnknown, v: _ArrayLikeUnknown, mode: _CorrelateMode = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def correlate(a: _ArrayLikeBool_co, v: _ArrayLikeBool_co, mode: _CorrelateMode = ...) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def correlate(a: _ArrayLikeUInt_co, v: _ArrayLikeUInt_co, mode: _CorrelateMode = ...) -> NDArray[unsignedinteger[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def correlate(a: _ArrayLikeInt_co, v: _ArrayLikeInt_co, mode: _CorrelateMode = ...) -> NDArray[signedinteger[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def correlate(a: _ArrayLikeFloat_co, v: _ArrayLikeFloat_co, mode: _CorrelateMode = ...) -> NDArray[floating[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def correlate(a: _ArrayLikeComplex_co, v: _ArrayLikeComplex_co, mode: _CorrelateMode = ...) -> NDArray[complexfloating[Any, Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def correlate(a: _ArrayLikeTD64_co, v: _ArrayLikeTD64_co, mode: _CorrelateMode = ...) -> NDArray[timedelta64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def correlate(a: _ArrayLikeObject_co, v: _ArrayLikeObject_co, mode: _CorrelateMode = ...) -> NDArray[object_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def convolve(a: _ArrayLikeUnknown, v: _ArrayLikeUnknown, mode: _CorrelateMode = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def convolve(a: _ArrayLikeBool_co, v: _ArrayLikeBool_co, mode: _CorrelateMode = ...) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def convolve(a: _ArrayLikeUInt_co, v: _ArrayLikeUInt_co, mode: _CorrelateMode = ...) -> NDArray[unsignedinteger[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def convolve(a: _ArrayLikeInt_co, v: _ArrayLikeInt_co, mode: _CorrelateMode = ...) -> NDArray[signedinteger[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def convolve(a: _ArrayLikeFloat_co, v: _ArrayLikeFloat_co, mode: _CorrelateMode = ...) -> NDArray[floating[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def convolve(a: _ArrayLikeComplex_co, v: _ArrayLikeComplex_co, mode: _CorrelateMode = ...) -> NDArray[complexfloating[Any, Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def convolve(a: _ArrayLikeTD64_co, v: _ArrayLikeTD64_co, mode: _CorrelateMode = ...) -> NDArray[timedelta64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def convolve(a: _ArrayLikeObject_co, v: _ArrayLikeObject_co, mode: _CorrelateMode = ...) -> NDArray[object_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def outer(a: _ArrayLikeUnknown, b: _ArrayLikeUnknown, out: None = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def outer(a: _ArrayLikeBool_co, b: _ArrayLikeBool_co, out: None = ...) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def outer(a: _ArrayLikeUInt_co, b: _ArrayLikeUInt_co, out: None = ...) -> NDArray[unsignedinteger[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def outer(a: _ArrayLikeInt_co, b: _ArrayLikeInt_co, out: None = ...) -> NDArray[signedinteger[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def outer(a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co, out: None = ...) -> NDArray[floating[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def outer(a: _ArrayLikeComplex_co, b: _ArrayLikeComplex_co, out: None = ...) -> NDArray[complexfloating[Any, Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def outer(a: _ArrayLikeTD64_co, b: _ArrayLikeTD64_co, out: None = ...) -> NDArray[timedelta64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def outer(a: _ArrayLikeObject_co, b: _ArrayLikeObject_co, out: None = ...) -> NDArray[object_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def outer(a: _ArrayLikeComplex_co | _ArrayLikeTD64_co | _ArrayLikeObject_co, b: _ArrayLikeComplex_co | _ArrayLikeTD64_co | _ArrayLikeObject_co, out: _ArrayType) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def tensordot(a: _ArrayLikeUnknown, b: _ArrayLikeUnknown, axes: int | tuple[_ShapeLike, _ShapeLike] = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def tensordot(a: _ArrayLikeBool_co, b: _ArrayLikeBool_co, axes: int | tuple[_ShapeLike, _ShapeLike] = ...) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def tensordot(a: _ArrayLikeUInt_co, b: _ArrayLikeUInt_co, axes: int | tuple[_ShapeLike, _ShapeLike] = ...) -> NDArray[unsignedinteger[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def tensordot(a: _ArrayLikeInt_co, b: _ArrayLikeInt_co, axes: int | tuple[_ShapeLike, _ShapeLike] = ...) -> NDArray[signedinteger[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def tensordot(a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co, axes: int | tuple[_ShapeLike, _ShapeLike] = ...) -> NDArray[floating[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def tensordot(a: _ArrayLikeComplex_co, b: _ArrayLikeComplex_co, axes: int | tuple[_ShapeLike, _ShapeLike] = ...) -> NDArray[complexfloating[Any, Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def tensordot(a: _ArrayLikeTD64_co, b: _ArrayLikeTD64_co, axes: int | tuple[_ShapeLike, _ShapeLike] = ...) -> NDArray[timedelta64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def tensordot(a: _ArrayLikeObject_co, b: _ArrayLikeObject_co, axes: int | tuple[_ShapeLike, _ShapeLike] = ...) -> NDArray[object_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def roll(a: _ArrayLike[_SCT], shift: _ShapeLike, axis: None | _ShapeLike = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def roll(a: ArrayLike, shift: _ShapeLike, axis: None | _ShapeLike = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
def rollaxis(a: NDArray[_SCT], axis: int, start: int = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
def moveaxis(a: NDArray[_SCT], source: _ShapeLike, destination: _ShapeLike) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cross(a: _ArrayLikeUnknown, b: _ArrayLikeUnknown, axisa: int = ..., axisb: int = ..., axisc: int = ..., axis: None | int = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cross(a: _ArrayLikeBool_co, b: _ArrayLikeBool_co, axisa: int = ..., axisb: int = ..., axisc: int = ..., axis: None | int = ...) -> NoReturn:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cross(a: _ArrayLikeUInt_co, b: _ArrayLikeUInt_co, axisa: int = ..., axisb: int = ..., axisc: int = ..., axis: None | int = ...) -> NDArray[unsignedinteger[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cross(a: _ArrayLikeInt_co, b: _ArrayLikeInt_co, axisa: int = ..., axisb: int = ..., axisc: int = ..., axis: None | int = ...) -> NDArray[signedinteger[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cross(a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co, axisa: int = ..., axisb: int = ..., axisc: int = ..., axis: None | int = ...) -> NDArray[floating[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cross(a: _ArrayLikeComplex_co, b: _ArrayLikeComplex_co, axisa: int = ..., axisb: int = ..., axisc: int = ..., axis: None | int = ...) -> NDArray[complexfloating[Any, Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def cross(a: _ArrayLikeObject_co, b: _ArrayLikeObject_co, axisa: int = ..., axisb: int = ..., axisc: int = ..., axis: None | int = ...) -> NDArray[object_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def indices(dimensions: Sequence[int], dtype: type[int] = ..., sparse: Literal[False] = ...) -> NDArray[int_]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def indices(dimensions: Sequence[int], dtype: type[int] = ..., sparse: Literal[True] = ...) -> tuple[NDArray[int_], ...]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def indices(dimensions: Sequence[int], dtype: _DTypeLike[_SCT], sparse: Literal[False] = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def indices(dimensions: Sequence[int], dtype: _DTypeLike[_SCT], sparse: Literal[True]) -> tuple[NDArray[_SCT], ...]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def indices(dimensions: Sequence[int], dtype: DTypeLike, sparse: Literal[False] = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def indices(dimensions: Sequence[int], dtype: DTypeLike, sparse: Literal[True]) -> tuple[NDArray[Any], ...]:
|
||||
...
|
||||
|
||||
def fromfunction(function: Callable[..., _T], shape: Sequence[int], *, dtype: DTypeLike = ..., like: _SupportsArrayFunc = ..., **kwargs: Any) -> _T:
|
||||
...
|
||||
|
||||
def isscalar(element: object) -> TypeGuard[generic | bool | int | float | complex | str | bytes | memoryview]:
|
||||
...
|
||||
|
||||
def binary_repr(num: SupportsIndex, width: None | int = ...) -> str:
|
||||
...
|
||||
|
||||
def base_repr(number: SupportsAbs[float], base: float = ..., padding: SupportsIndex = ...) -> str:
|
||||
...
|
||||
|
||||
@overload
|
||||
def identity(n: int, dtype: None = ..., *, like: _SupportsArrayFunc = ...) -> NDArray[float64]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def identity(n: int, dtype: _DTypeLike[_SCT], *, like: _SupportsArrayFunc = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def identity(n: int, dtype: DTypeLike, *, like: _SupportsArrayFunc = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
def allclose(a: ArrayLike, b: ArrayLike, rtol: float = ..., atol: float = ..., equal_nan: bool = ...) -> bool:
|
||||
...
|
||||
|
||||
@overload
|
||||
def isclose(a: _ScalarLike_co, b: _ScalarLike_co, rtol: float = ..., atol: float = ..., equal_nan: bool = ...) -> bool_:
|
||||
...
|
||||
|
||||
@overload
|
||||
def isclose(a: ArrayLike, b: ArrayLike, rtol: float = ..., atol: float = ..., equal_nan: bool = ...) -> NDArray[bool_]:
|
||||
...
|
||||
|
||||
def array_equal(a1: ArrayLike, a2: ArrayLike, equal_nan: bool = ...) -> bool:
|
||||
...
|
||||
|
||||
def array_equiv(a1: ArrayLike, a2: ArrayLike) -> bool:
|
||||
...
|
||||
|
||||
103
typings/numpy/core/numerictypes.pyi
Normal file
103
typings/numpy/core/numerictypes.pyi
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import types
|
||||
from typing import Any, Literal as L, Protocol, TypeVar, TypedDict, Union, overload
|
||||
from numpy import bool_, byte, bytes_, cdouble, clongdouble, csingle, datetime64, double, dtype, generic, half, int_, intc, longdouble, longlong, ndarray, object_, short, single, str_, timedelta64, ubyte, uint, uintc, ulonglong, ushort, void
|
||||
from numpy._typing import ArrayLike, DTypeLike, _DTypeLike
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_SCT = TypeVar("_SCT", bound=generic)
|
||||
class _CastFunc(Protocol):
|
||||
def __call__(self, x: ArrayLike, k: DTypeLike = ...) -> ndarray[Any, dtype[Any]]:
|
||||
...
|
||||
|
||||
|
||||
|
||||
class _TypeCodes(TypedDict):
|
||||
Character: L['c']
|
||||
Integer: L['bhilqp']
|
||||
UnsignedInteger: L['BHILQP']
|
||||
Float: L['efdg']
|
||||
Complex: L['FDG']
|
||||
AllInteger: L['bBhHiIlLqQpP']
|
||||
AllFloat: L['efdgFDG']
|
||||
Datetime: L['Mm']
|
||||
All: L['?bhilqpBHILQPefdgFDGSUVOMm']
|
||||
...
|
||||
|
||||
|
||||
class _typedict(dict[type[generic], _T]):
|
||||
def __getitem__(self, key: DTypeLike) -> _T:
|
||||
...
|
||||
|
||||
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
_TypeTuple = Union[type[Any], types.UnionType, tuple[Union[type[Any], types.UnionType, tuple[Any, ...]], ...],]
|
||||
else:
|
||||
...
|
||||
__all__: list[str]
|
||||
@overload
|
||||
def maximum_sctype(t: _DTypeLike[_SCT]) -> type[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def maximum_sctype(t: DTypeLike) -> type[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def issctype(rep: dtype[Any] | type[Any]) -> bool:
|
||||
...
|
||||
|
||||
@overload
|
||||
def issctype(rep: object) -> L[False]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def obj2sctype(rep: _DTypeLike[_SCT], default: None = ...) -> None | type[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def obj2sctype(rep: _DTypeLike[_SCT], default: _T) -> _T | type[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def obj2sctype(rep: DTypeLike, default: None = ...) -> None | type[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def obj2sctype(rep: DTypeLike, default: _T) -> _T | type[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def obj2sctype(rep: object, default: None = ...) -> None:
|
||||
...
|
||||
|
||||
@overload
|
||||
def obj2sctype(rep: object, default: _T) -> _T:
|
||||
...
|
||||
|
||||
@overload
|
||||
def issubclass_(arg1: type[Any], arg2: _TypeTuple) -> bool:
|
||||
...
|
||||
|
||||
@overload
|
||||
def issubclass_(arg1: object, arg2: object) -> L[False]:
|
||||
...
|
||||
|
||||
def issubsctype(arg1: DTypeLike, arg2: DTypeLike) -> bool:
|
||||
...
|
||||
|
||||
def issubdtype(arg1: DTypeLike, arg2: DTypeLike) -> bool:
|
||||
...
|
||||
|
||||
def sctype2char(sctype: DTypeLike) -> str:
|
||||
...
|
||||
|
||||
cast: _typedict[_CastFunc]
|
||||
nbytes: _typedict[int]
|
||||
typecodes: _TypeCodes
|
||||
ScalarType: tuple[type[int], type[float], type[complex], type[bool], type[bytes], type[str], type[memoryview], type[bool_], type[csingle], type[cdouble], type[clongdouble], type[half], type[single], type[double], type[longdouble], type[byte], type[short], type[intc], type[int_], type[longlong], type[timedelta64], type[datetime64], type[object_], type[bytes_], type[str_], type[ubyte], type[ushort], type[uintc], type[uint], type[ulonglong], type[void],]
|
||||
85
typings/numpy/core/records.pyi
Normal file
85
typings/numpy/core/records.pyi
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import os
|
||||
from collections.abc import Iterable, Sequence
|
||||
from typing import Any, Protocol, TypeVar, overload
|
||||
from numpy import _ByteOrder, _SupportsBuffer, dtype, generic, recarray as recarray, record as record
|
||||
from numpy._typing import ArrayLike, DTypeLike, NDArray, _ArrayLikeVoid_co, _NestedSequence, _ShapeLike
|
||||
|
||||
_SCT = TypeVar("_SCT", bound=generic)
|
||||
_RecArray = recarray[Any, dtype[_SCT]]
|
||||
class _SupportsReadInto(Protocol):
|
||||
def seek(self, offset: int, whence: int, /) -> object:
|
||||
...
|
||||
|
||||
def tell(self, /) -> int:
|
||||
...
|
||||
|
||||
def readinto(self, buffer: memoryview, /) -> int:
|
||||
...
|
||||
|
||||
|
||||
|
||||
__all__: list[str]
|
||||
@overload
|
||||
def fromarrays(arrayList: Iterable[ArrayLike], dtype: DTypeLike = ..., shape: None | _ShapeLike = ..., formats: None = ..., names: None = ..., titles: None = ..., aligned: bool = ..., byteorder: None = ...) -> _RecArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def fromarrays(arrayList: Iterable[ArrayLike], dtype: None = ..., shape: None | _ShapeLike = ..., *, formats: DTypeLike, names: None | str | Sequence[str] = ..., titles: None | str | Sequence[str] = ..., aligned: bool = ..., byteorder: None | _ByteOrder = ...) -> _RecArray[record]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def fromrecords(recList: _ArrayLikeVoid_co | tuple[Any, ...] | _NestedSequence[tuple[Any, ...]], dtype: DTypeLike = ..., shape: None | _ShapeLike = ..., formats: None = ..., names: None = ..., titles: None = ..., aligned: bool = ..., byteorder: None = ...) -> _RecArray[record]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def fromrecords(recList: _ArrayLikeVoid_co | tuple[Any, ...] | _NestedSequence[tuple[Any, ...]], dtype: None = ..., shape: None | _ShapeLike = ..., *, formats: DTypeLike, names: None | str | Sequence[str] = ..., titles: None | str | Sequence[str] = ..., aligned: bool = ..., byteorder: None | _ByteOrder = ...) -> _RecArray[record]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def fromstring(datastring: _SupportsBuffer, dtype: DTypeLike, shape: None | _ShapeLike = ..., offset: int = ..., formats: None = ..., names: None = ..., titles: None = ..., aligned: bool = ..., byteorder: None = ...) -> _RecArray[record]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def fromstring(datastring: _SupportsBuffer, dtype: None = ..., shape: None | _ShapeLike = ..., offset: int = ..., *, formats: DTypeLike, names: None | str | Sequence[str] = ..., titles: None | str | Sequence[str] = ..., aligned: bool = ..., byteorder: None | _ByteOrder = ...) -> _RecArray[record]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def fromfile(fd: str | bytes | os.PathLike[str] | os.PathLike[bytes] | _SupportsReadInto, dtype: DTypeLike, shape: None | _ShapeLike = ..., offset: int = ..., formats: None = ..., names: None = ..., titles: None = ..., aligned: bool = ..., byteorder: None = ...) -> _RecArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def fromfile(fd: str | bytes | os.PathLike[str] | os.PathLike[bytes] | _SupportsReadInto, dtype: None = ..., shape: None | _ShapeLike = ..., offset: int = ..., *, formats: DTypeLike, names: None | str | Sequence[str] = ..., titles: None | str | Sequence[str] = ..., aligned: bool = ..., byteorder: None | _ByteOrder = ...) -> _RecArray[record]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def array(obj: _SCT | NDArray[_SCT], dtype: None = ..., shape: None | _ShapeLike = ..., offset: int = ..., formats: None = ..., names: None = ..., titles: None = ..., aligned: bool = ..., byteorder: None = ..., copy: bool = ...) -> _RecArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def array(obj: ArrayLike, dtype: DTypeLike, shape: None | _ShapeLike = ..., offset: int = ..., formats: None = ..., names: None = ..., titles: None = ..., aligned: bool = ..., byteorder: None = ..., copy: bool = ...) -> _RecArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def array(obj: ArrayLike, dtype: None = ..., shape: None | _ShapeLike = ..., offset: int = ..., *, formats: DTypeLike, names: None | str | Sequence[str] = ..., titles: None | str | Sequence[str] = ..., aligned: bool = ..., byteorder: None | _ByteOrder = ..., copy: bool = ...) -> _RecArray[record]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def array(obj: None, dtype: DTypeLike, shape: _ShapeLike, offset: int = ..., formats: None = ..., names: None = ..., titles: None = ..., aligned: bool = ..., byteorder: None = ..., copy: bool = ...) -> _RecArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def array(obj: None, dtype: None = ..., *, shape: _ShapeLike, offset: int = ..., formats: DTypeLike, names: None | str | Sequence[str] = ..., titles: None | str | Sequence[str] = ..., aligned: bool = ..., byteorder: None | _ByteOrder = ..., copy: bool = ...) -> _RecArray[record]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def array(obj: _SupportsReadInto, dtype: DTypeLike, shape: None | _ShapeLike = ..., offset: int = ..., formats: None = ..., names: None = ..., titles: None = ..., aligned: bool = ..., byteorder: None = ..., copy: bool = ...) -> _RecArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def array(obj: _SupportsReadInto, dtype: None = ..., shape: None | _ShapeLike = ..., offset: int = ..., *, formats: DTypeLike, names: None | str | Sequence[str] = ..., titles: None | str | Sequence[str] = ..., aligned: bool = ..., byteorder: None | _ByteOrder = ..., copy: bool = ...) -> _RecArray[record]:
|
||||
...
|
||||
|
||||
96
typings/numpy/core/shape_base.pyi
Normal file
96
typings/numpy/core/shape_base.pyi
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from collections.abc import Sequence
|
||||
from typing import Any, SupportsIndex, TypeVar, overload
|
||||
from numpy import _CastingKind, generic
|
||||
from numpy._typing import ArrayLike, DTypeLike, NDArray, _ArrayLike, _DTypeLike
|
||||
|
||||
_SCT = TypeVar("_SCT", bound=generic)
|
||||
_ArrayType = TypeVar("_ArrayType", bound=NDArray[Any])
|
||||
__all__: list[str]
|
||||
@overload
|
||||
def atleast_1d(arys: _ArrayLike[_SCT], /) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def atleast_1d(arys: ArrayLike, /) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def atleast_1d(*arys: ArrayLike) -> list[NDArray[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def atleast_2d(arys: _ArrayLike[_SCT], /) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def atleast_2d(arys: ArrayLike, /) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def atleast_2d(*arys: ArrayLike) -> list[NDArray[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def atleast_3d(arys: _ArrayLike[_SCT], /) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def atleast_3d(arys: ArrayLike, /) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def atleast_3d(*arys: ArrayLike) -> list[NDArray[Any]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def vstack(tup: Sequence[_ArrayLike[_SCT]], *, dtype: None = ..., casting: _CastingKind = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def vstack(tup: Sequence[ArrayLike], *, dtype: _DTypeLike[_SCT], casting: _CastingKind = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def vstack(tup: Sequence[ArrayLike], *, dtype: DTypeLike = ..., casting: _CastingKind = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def hstack(tup: Sequence[_ArrayLike[_SCT]], *, dtype: None = ..., casting: _CastingKind = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def hstack(tup: Sequence[ArrayLike], *, dtype: _DTypeLike[_SCT], casting: _CastingKind = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def hstack(tup: Sequence[ArrayLike], *, dtype: DTypeLike = ..., casting: _CastingKind = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def stack(arrays: Sequence[_ArrayLike[_SCT]], axis: SupportsIndex = ..., out: None = ..., *, dtype: None = ..., casting: _CastingKind = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def stack(arrays: Sequence[ArrayLike], axis: SupportsIndex = ..., out: None = ..., *, dtype: _DTypeLike[_SCT], casting: _CastingKind = ...) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def stack(arrays: Sequence[ArrayLike], axis: SupportsIndex = ..., out: None = ..., *, dtype: DTypeLike = ..., casting: _CastingKind = ...) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def stack(arrays: Sequence[ArrayLike], axis: SupportsIndex = ..., out: _ArrayType = ..., *, dtype: DTypeLike = ..., casting: _CastingKind = ...) -> _ArrayType:
|
||||
...
|
||||
|
||||
@overload
|
||||
def block(arrays: _ArrayLike[_SCT]) -> NDArray[_SCT]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def block(arrays: ArrayLike) -> NDArray[Any]:
|
||||
...
|
||||
|
||||
14
typings/numpy/core/umath.pyi
Normal file
14
typings/numpy/core/umath.pyi
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from ._multiarray_umath import *
|
||||
|
||||
"""
|
||||
Create the numpy.core.umath namespace for backward compatibility. In v1.16
|
||||
the multiarray and umath c-extension modules were merged into a single
|
||||
_multiarray_umath extension module. So we replicate the old namespace
|
||||
by importing from the extension module.
|
||||
|
||||
"""
|
||||
__all__ = ['_UFUNC_API', 'ERR_CALL', 'ERR_DEFAULT', 'ERR_IGNORE', 'ERR_LOG', 'ERR_PRINT', 'ERR_RAISE', 'ERR_WARN', 'FLOATING_POINT_SUPPORT', 'FPE_DIVIDEBYZERO', 'FPE_INVALID', 'FPE_OVERFLOW', 'FPE_UNDERFLOW', 'NAN', 'NINF', 'NZERO', 'PINF', 'PZERO', 'SHIFT_DIVIDEBYZERO', 'SHIFT_INVALID', 'SHIFT_OVERFLOW', 'SHIFT_UNDERFLOW', 'UFUNC_BUFSIZE_DEFAULT', 'UFUNC_PYVALS_NAME', '_add_newdoc_ufunc', 'absolute', 'add', 'arccos', 'arccosh', 'arcsin', 'arcsinh', 'arctan', 'arctan2', 'arctanh', 'bitwise_and', 'bitwise_or', 'bitwise_xor', 'cbrt', 'ceil', 'conj', 'conjugate', 'copysign', 'cos', 'cosh', 'deg2rad', 'degrees', 'divide', 'divmod', 'e', 'equal', 'euler_gamma', 'exp', 'exp2', 'expm1', 'fabs', 'floor', 'floor_divide', 'float_power', 'fmax', 'fmin', 'fmod', 'frexp', 'frompyfunc', 'gcd', 'geterrobj', 'greater', 'greater_equal', 'heaviside', 'hypot', 'invert', 'isfinite', 'isinf', 'isnan', 'isnat', 'lcm', 'ldexp', 'left_shift', 'less', 'less_equal', 'log', 'log10', 'log1p', 'log2', 'logaddexp', 'logaddexp2', 'logical_and', 'logical_not', 'logical_or', 'logical_xor', 'maximum', 'minimum', 'mod', 'modf', 'multiply', 'negative', 'nextafter', 'not_equal', 'pi', 'positive', 'power', 'rad2deg', 'radians', 'reciprocal', 'remainder', 'right_shift', 'rint', 'seterrobj', 'sign', 'signbit', 'sin', 'sinh', 'spacing', 'sqrt', 'square', 'subtract', 'tan', 'tanh', 'true_divide', 'trunc']
|
||||
Loading…
Add table
Add a link
Reference in a new issue