golden hour
/opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/lib
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.py
2.7 KB
Del
OK
__init__.pyi
5.46 KB
Del
OK
__pycache__
-
Del
OK
_datasource.py
22.1 KB
Del
OK
_iotools.py
30.14 KB
Del
OK
_version.py
4.74 KB
Del
OK
_version.pyi
633 B
Del
OK
arraypad.py
31.06 KB
Del
OK
arraypad.pyi
1.69 KB
Del
OK
arraysetops.py
32.87 KB
Del
OK
arraysetops.pyi
8.14 KB
Del
OK
arrayterator.py
6.9 KB
Del
OK
arrayterator.pyi
1.5 KB
Del
OK
format.py
33.95 KB
Del
OK
format.pyi
748 B
Del
OK
function_base.py
184.67 KB
Del
OK
function_base.pyi
16.2 KB
Del
OK
histograms.py
36.81 KB
Del
OK
histograms.pyi
995 B
Del
OK
index_tricks.py
30.61 KB
Del
OK
index_tricks.pyi
4.15 KB
Del
OK
mixins.py
6.91 KB
Del
OK
mixins.pyi
3.04 KB
Del
OK
nanfunctions.py
64.23 KB
Del
OK
nanfunctions.pyi
606 B
Del
OK
npyio.py
95.04 KB
Del
OK
npyio.pyi
9.5 KB
Del
OK
polynomial.py
43.1 KB
Del
OK
polynomial.pyi
6.79 KB
Del
OK
recfunctions.py
58.03 KB
Del
OK
scimath.py
14.68 KB
Del
OK
scimath.pyi
2.82 KB
Del
OK
setup.py
405 B
Del
OK
shape_base.py
38.03 KB
Del
OK
shape_base.pyi
5.06 KB
Del
OK
stride_tricks.py
17.49 KB
Del
OK
stride_tricks.pyi
1.71 KB
Del
OK
tests
-
Del
OK
twodim_base.py
32.17 KB
Del
OK
twodim_base.pyi
5.24 KB
Del
OK
type_check.py
19.49 KB
Del
OK
type_check.pyi
5.44 KB
Del
OK
ufunclike.py
6.18 KB
Del
OK
ufunclike.pyi
1.26 KB
Del
OK
user_array.py
7.54 KB
Del
OK
utils.py
36.92 KB
Del
OK
utils.pyi
2.3 KB
Del
OK
Edit: type_check.pyi
from collections.abc import Container, Iterable from typing import ( Literal as L, Any, overload, TypeVar, Protocol, ) from numpy import ( dtype, generic, bool_, floating, float64, complexfloating, integer, ) from numpy._typing import ( ArrayLike, DTypeLike, NBitBase, NDArray, _64Bit, _SupportsDType, _ScalarLike_co, _ArrayLike, _DTypeLikeComplex, ) _T = TypeVar("_T") _T_co = TypeVar("_T_co", covariant=True) _SCT = TypeVar("_SCT", bound=generic) _NBit1 = TypeVar("_NBit1", bound=NBitBase) _NBit2 = TypeVar("_NBit2", bound=NBitBase) class _SupportsReal(Protocol[_T_co]): @property def real(self) -> _T_co: ... class _SupportsImag(Protocol[_T_co]): @property def imag(self) -> _T_co: ... __all__: list[str] def mintypecode( typechars: Iterable[str | ArrayLike], typeset: Container[str] = ..., default: str = ..., ) -> str: ... # `asfarray` ignores dtypes if they're not inexact @overload def asfarray( a: object, dtype: None | type[float] = ..., ) -> NDArray[float64]: ... @overload def asfarray( # type: ignore[misc] a: Any, dtype: _DTypeLikeComplex, ) -> NDArray[complexfloating[Any, Any]]: ... @overload def asfarray( a: Any, dtype: DTypeLike, ) -> NDArray[floating[Any]]: ... @overload def real(val: _SupportsReal[_T]) -> _T: ... @overload def real(val: ArrayLike) -> NDArray[Any]: ... @overload def imag(val: _SupportsImag[_T]) -> _T: ... @overload def imag(val: ArrayLike) -> NDArray[Any]: ... @overload def iscomplex(x: _ScalarLike_co) -> bool_: ... # type: ignore[misc] @overload def iscomplex(x: ArrayLike) -> NDArray[bool_]: ... @overload def isreal(x: _ScalarLike_co) -> bool_: ... # type: ignore[misc] @overload def isreal(x: ArrayLike) -> NDArray[bool_]: ... def iscomplexobj(x: _SupportsDType[dtype[Any]] | ArrayLike) -> bool: ... def isrealobj(x: _SupportsDType[dtype[Any]] | ArrayLike) -> bool: ... @overload def nan_to_num( # type: ignore[misc] x: _SCT, copy: bool = ..., nan: float = ..., posinf: None | float = ..., neginf: None | float = ..., ) -> _SCT: ... @overload def nan_to_num( x: _ScalarLike_co, copy: bool = ..., nan: float = ..., posinf: None | float = ..., neginf: None | float = ..., ) -> Any: ... @overload def nan_to_num( x: _ArrayLike[_SCT], copy: bool = ..., nan: float = ..., posinf: None | float = ..., neginf: None | float = ..., ) -> NDArray[_SCT]: ... @overload def nan_to_num( x: ArrayLike, copy: bool = ..., nan: float = ..., posinf: None | float = ..., neginf: None | float = ..., ) -> NDArray[Any]: ... # If one passes a complex array to `real_if_close`, then one is reasonably # expected to verify the output dtype (so we can return an unsafe union here) @overload def real_if_close( # type: ignore[misc] a: _ArrayLike[complexfloating[_NBit1, _NBit1]], tol: float = ..., ) -> NDArray[floating[_NBit1]] | NDArray[complexfloating[_NBit1, _NBit1]]: ... @overload def real_if_close( a: _ArrayLike[_SCT], tol: float = ..., ) -> NDArray[_SCT]: ... @overload def real_if_close( a: ArrayLike, tol: float = ..., ) -> NDArray[Any]: ... @overload def typename(char: L['S1']) -> L['character']: ... @overload def typename(char: L['?']) -> L['bool']: ... @overload def typename(char: L['b']) -> L['signed char']: ... @overload def typename(char: L['B']) -> L['unsigned char']: ... @overload def typename(char: L['h']) -> L['short']: ... @overload def typename(char: L['H']) -> L['unsigned short']: ... @overload def typename(char: L['i']) -> L['integer']: ... @overload def typename(char: L['I']) -> L['unsigned integer']: ... @overload def typename(char: L['l']) -> L['long integer']: ... @overload def typename(char: L['L']) -> L['unsigned long integer']: ... @overload def typename(char: L['q']) -> L['long long integer']: ... @overload def typename(char: L['Q']) -> L['unsigned long long integer']: ... @overload def typename(char: L['f']) -> L['single precision']: ... @overload def typename(char: L['d']) -> L['double precision']: ... @overload def typename(char: L['g']) -> L['long precision']: ... @overload def typename(char: L['F']) -> L['complex single precision']: ... @overload def typename(char: L['D']) -> L['complex double precision']: ... @overload def typename(char: L['G']) -> L['complex long double precision']: ... @overload def typename(char: L['S']) -> L['string']: ... @overload def typename(char: L['U']) -> L['unicode']: ... @overload def typename(char: L['V']) -> L['void']: ... @overload def typename(char: L['O']) -> L['object']: ... @overload def common_type( # type: ignore[misc] *arrays: _SupportsDType[dtype[ integer[Any] ]] ) -> type[floating[_64Bit]]: ... @overload def common_type( # type: ignore[misc] *arrays: _SupportsDType[dtype[ floating[_NBit1] ]] ) -> type[floating[_NBit1]]: ... @overload def common_type( # type: ignore[misc] *arrays: _SupportsDType[dtype[ integer[Any] | floating[_NBit1] ]] ) -> type[floating[_NBit1 | _64Bit]]: ... @overload def common_type( # type: ignore[misc] *arrays: _SupportsDType[dtype[ floating[_NBit1] | complexfloating[_NBit2, _NBit2] ]] ) -> type[complexfloating[_NBit1 | _NBit2, _NBit1 | _NBit2]]: ... @overload def common_type( *arrays: _SupportsDType[dtype[ integer[Any] | floating[_NBit1] | complexfloating[_NBit2, _NBit2] ]] ) -> type[complexfloating[_64Bit | _NBit1 | _NBit2, _64Bit | _NBit1 | _NBit2]]: ...
Save