"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "numpy/__init__.pyi" between
numpy-1.21.0.tar.gz and numpy-1.21.1.tar.gz

About: NumPy is the fundamental package for scientific computing with Python.

__init__.pyi  (numpy-1.21.0):__init__.pyi  (numpy-1.21.1)
import builtins import builtins
import os import os
import sys import sys
import mmap
import ctypes as ct
import array as _array
import datetime as dt import datetime as dt
from abc import abstractmethod from abc import abstractmethod
from types import TracebackType from types import TracebackType
from contextlib import ContextDecorator from contextlib import ContextDecorator
from numpy.core._internal import _ctypes from numpy.core._internal import _ctypes
from numpy.typing import ( from numpy.typing import (
# Arrays # Arrays
ArrayLike, ArrayLike,
NDArray, NDArray,
skipping to change at line 923 skipping to change at line 926
def __new__( def __new__(
cls, cls,
dtype: Type[_DTypeScalar_co], dtype: Type[_DTypeScalar_co],
align: bool = ..., align: bool = ...,
copy: bool = ..., copy: bool = ...,
) -> dtype[_DTypeScalar_co]: ... ) -> dtype[_DTypeScalar_co]: ...
# Overloads for string aliases, Python types, and some assorted # Overloads for string aliases, Python types, and some assorted
# other special cases. Order is sometimes important because of the # other special cases. Order is sometimes important because of the
# subtype relationships # subtype relationships
# #
# bool < int < float < complex # bool < int < float < complex < object
# #
# so we have to make sure the overloads for the narrowest type is # so we have to make sure the overloads for the narrowest type is
# first. # first.
# Builtin types # Builtin types
@overload @overload
def __new__(cls, dtype: Type[bool], align: bool = ..., copy: bool = ...) -> dtype[bool_]: ... def __new__(cls, dtype: Type[bool], align: bool = ..., copy: bool = ...) -> dtype[bool_]: ...
@overload @overload
def __new__(cls, dtype: Type[int], align: bool = ..., copy: bool = ...) -> d type[int_]: ... def __new__(cls, dtype: Type[int], align: bool = ..., copy: bool = ...) -> d type[int_]: ...
@overload @overload
def __new__(cls, dtype: Optional[Type[float]], align: bool = ..., copy: bool = ...) -> dtype[float_]: ... def __new__(cls, dtype: Optional[Type[float]], align: bool = ..., copy: bool = ...) -> dtype[float_]: ...
@overload @overload
def __new__(cls, dtype: Type[complex], align: bool = ..., copy: bool = ...) -> dtype[complex_]: ... def __new__(cls, dtype: Type[complex], align: bool = ..., copy: bool = ...) -> dtype[complex_]: ...
@overload @overload
def __new__(cls, dtype: Type[str], align: bool = ..., copy: bool = ...) -> d type[str_]: ... def __new__(cls, dtype: Type[str], align: bool = ..., copy: bool = ...) -> d type[str_]: ...
@overload @overload
def __new__(cls, dtype: Type[bytes], align: bool = ..., copy: bool = ...) -> dtype[bytes_]: ... def __new__(cls, dtype: Type[bytes], align: bool = ..., copy: bool = ...) -> dtype[bytes_]: ...
# `unsignedinteger` string-based representations # `unsignedinteger` string-based representations and ctypes
@overload @overload
def __new__(cls, dtype: _UInt8Codes, align: bool = ..., copy: bool = ...) -> dtype[uint8]: ... def __new__(cls, dtype: _UInt8Codes | Type[ct.c_uint8], align: bool = ..., c opy: bool = ...) -> dtype[uint8]: ...
@overload @overload
def __new__(cls, dtype: _UInt16Codes, align: bool = ..., copy: bool = ...) - > dtype[uint16]: ... def __new__(cls, dtype: _UInt16Codes | Type[ct.c_uint16], align: bool = ..., copy: bool = ...) -> dtype[uint16]: ...
@overload @overload
def __new__(cls, dtype: _UInt32Codes, align: bool = ..., copy: bool = ...) - > dtype[uint32]: ... def __new__(cls, dtype: _UInt32Codes | Type[ct.c_uint32], align: bool = ..., copy: bool = ...) -> dtype[uint32]: ...
@overload @overload
def __new__(cls, dtype: _UInt64Codes, align: bool = ..., copy: bool = ...) - > dtype[uint64]: ... def __new__(cls, dtype: _UInt64Codes | Type[ct.c_uint64], align: bool = ..., copy: bool = ...) -> dtype[uint64]: ...
@overload @overload
def __new__(cls, dtype: _UByteCodes, align: bool = ..., copy: bool = ...) -> dtype[ubyte]: ... def __new__(cls, dtype: _UByteCodes | Type[ct.c_ubyte], align: bool = ..., c opy: bool = ...) -> dtype[ubyte]: ...
@overload @overload
def __new__(cls, dtype: _UShortCodes, align: bool = ..., copy: bool = ...) - > dtype[ushort]: ... def __new__(cls, dtype: _UShortCodes | Type[ct.c_ushort], align: bool = ..., copy: bool = ...) -> dtype[ushort]: ...
@overload @overload
def __new__(cls, dtype: _UIntCCodes, align: bool = ..., copy: bool = ...) -> def __new__(cls, dtype: _UIntCCodes | Type[ct.c_uint], align: bool = ..., co
dtype[uintc]: ... py: bool = ...) -> dtype[uintc]: ...
# NOTE: We're assuming here that `uint_ptr_t == size_t`,
# an assumption that does not hold in rare cases (same for `ssize_t`)
@overload @overload
def __new__(cls, dtype: _UIntPCodes, align: bool = ..., copy: bool = ...) -> dtype[uintp]: ... def __new__(cls, dtype: _UIntPCodes | Type[ct.c_void_p] | Type[ct.c_size_t], align: bool = ..., copy: bool = ...) -> dtype[uintp]: ...
@overload @overload
def __new__(cls, dtype: _UIntCodes, align: bool = ..., copy: bool = ...) -> dtype[uint]: ... def __new__(cls, dtype: _UIntCodes | Type[ct.c_ulong], align: bool = ..., co py: bool = ...) -> dtype[uint]: ...
@overload @overload
def __new__(cls, dtype: _ULongLongCodes, align: bool = ..., copy: bool = ... ) -> dtype[ulonglong]: ... def __new__(cls, dtype: _ULongLongCodes | Type[ct.c_ulonglong], align: bool = ..., copy: bool = ...) -> dtype[ulonglong]: ...
# `signedinteger` string-based representations # `signedinteger` string-based representations and ctypes
@overload @overload
def __new__(cls, dtype: _Int8Codes, align: bool = ..., copy: bool = ...) -> dtype[int8]: ... def __new__(cls, dtype: _Int8Codes | Type[ct.c_int8], align: bool = ..., cop y: bool = ...) -> dtype[int8]: ...
@overload @overload
def __new__(cls, dtype: _Int16Codes, align: bool = ..., copy: bool = ...) -> dtype[int16]: ... def __new__(cls, dtype: _Int16Codes | Type[ct.c_int16], align: bool = ..., c opy: bool = ...) -> dtype[int16]: ...
@overload @overload
def __new__(cls, dtype: _Int32Codes, align: bool = ..., copy: bool = ...) -> dtype[int32]: ... def __new__(cls, dtype: _Int32Codes | Type[ct.c_int32], align: bool = ..., c opy: bool = ...) -> dtype[int32]: ...
@overload @overload
def __new__(cls, dtype: _Int64Codes, align: bool = ..., copy: bool = ...) -> dtype[int64]: ... def __new__(cls, dtype: _Int64Codes | Type[ct.c_int64], align: bool = ..., c opy: bool = ...) -> dtype[int64]: ...
@overload @overload
def __new__(cls, dtype: _ByteCodes, align: bool = ..., copy: bool = ...) -> dtype[byte]: ... def __new__(cls, dtype: _ByteCodes | Type[ct.c_byte], align: bool = ..., cop y: bool = ...) -> dtype[byte]: ...
@overload @overload
def __new__(cls, dtype: _ShortCodes, align: bool = ..., copy: bool = ...) -> dtype[short]: ... def __new__(cls, dtype: _ShortCodes | Type[ct.c_short], align: bool = ..., c opy: bool = ...) -> dtype[short]: ...
@overload @overload
def __new__(cls, dtype: _IntCCodes, align: bool = ..., copy: bool = ...) -> dtype[intc]: ... def __new__(cls, dtype: _IntCCodes | Type[ct.c_int], align: bool = ..., copy : bool = ...) -> dtype[intc]: ...
@overload @overload
def __new__(cls, dtype: _IntPCodes, align: bool = ..., copy: bool = ...) -> dtype[intp]: ... def __new__(cls, dtype: _IntPCodes | Type[ct.c_ssize_t], align: bool = ..., copy: bool = ...) -> dtype[intp]: ...
@overload @overload
def __new__(cls, dtype: _IntCodes, align: bool = ..., copy: bool = ...) -> d type[int_]: ... def __new__(cls, dtype: _IntCodes | Type[ct.c_long], align: bool = ..., copy : bool = ...) -> dtype[int_]: ...
@overload @overload
def __new__(cls, dtype: _LongLongCodes, align: bool = ..., copy: bool = ...) -> dtype[longlong]: ... def __new__(cls, dtype: _LongLongCodes | Type[ct.c_longlong], align: bool = ..., copy: bool = ...) -> dtype[longlong]: ...
# `floating` string-based representations # `floating` string-based representations and ctypes
@overload @overload
def __new__(cls, dtype: _Float16Codes, align: bool = ..., copy: bool = ...) -> dtype[float16]: ... def __new__(cls, dtype: _Float16Codes, align: bool = ..., copy: bool = ...) -> dtype[float16]: ...
@overload @overload
def __new__(cls, dtype: _Float32Codes, align: bool = ..., copy: bool = ...) -> dtype[float32]: ... def __new__(cls, dtype: _Float32Codes, align: bool = ..., copy: bool = ...) -> dtype[float32]: ...
@overload @overload
def __new__(cls, dtype: _Float64Codes, align: bool = ..., copy: bool = ...) -> dtype[float64]: ... def __new__(cls, dtype: _Float64Codes, align: bool = ..., copy: bool = ...) -> dtype[float64]: ...
@overload @overload
def __new__(cls, dtype: _HalfCodes, align: bool = ..., copy: bool = ...) -> dtype[half]: ... def __new__(cls, dtype: _HalfCodes, align: bool = ..., copy: bool = ...) -> dtype[half]: ...
@overload @overload
def __new__(cls, dtype: _SingleCodes, align: bool = ..., copy: bool = ...) - > dtype[single]: ... def __new__(cls, dtype: _SingleCodes | Type[ct.c_float], align: bool = ..., copy: bool = ...) -> dtype[single]: ...
@overload @overload
def __new__(cls, dtype: _DoubleCodes, align: bool = ..., copy: bool = ...) - > dtype[double]: ... def __new__(cls, dtype: _DoubleCodes | Type[ct.c_double], align: bool = ..., copy: bool = ...) -> dtype[double]: ...
@overload @overload
def __new__(cls, dtype: _LongDoubleCodes, align: bool = ..., copy: bool = .. .) -> dtype[longdouble]: ... def __new__(cls, dtype: _LongDoubleCodes | Type[ct.c_longdouble], align: boo l = ..., copy: bool = ...) -> dtype[longdouble]: ...
# `complexfloating` string-based representations # `complexfloating` string-based representations
@overload @overload
def __new__(cls, dtype: _Complex64Codes, align: bool = ..., copy: bool = ... ) -> dtype[complex64]: ... def __new__(cls, dtype: _Complex64Codes, align: bool = ..., copy: bool = ... ) -> dtype[complex64]: ...
@overload @overload
def __new__(cls, dtype: _Complex128Codes, align: bool = ..., copy: bool = .. .) -> dtype[complex128]: ... def __new__(cls, dtype: _Complex128Codes, align: bool = ..., copy: bool = .. .) -> dtype[complex128]: ...
@overload @overload
def __new__(cls, dtype: _CSingleCodes, align: bool = ..., copy: bool = ...) -> dtype[csingle]: ... def __new__(cls, dtype: _CSingleCodes, align: bool = ..., copy: bool = ...) -> dtype[csingle]: ...
@overload @overload
def __new__(cls, dtype: _CDoubleCodes, align: bool = ..., copy: bool = ...) -> dtype[cdouble]: ... def __new__(cls, dtype: _CDoubleCodes, align: bool = ..., copy: bool = ...) -> dtype[cdouble]: ...
@overload @overload
def __new__(cls, dtype: _CLongDoubleCodes, align: bool = ..., copy: bool = . ..) -> dtype[clongdouble]: ... def __new__(cls, dtype: _CLongDoubleCodes, align: bool = ..., copy: bool = . ..) -> dtype[clongdouble]: ...
# Miscellaneous string-based representations # Miscellaneous string-based representations and ctypes
@overload @overload
def __new__(cls, dtype: _BoolCodes, align: bool = ..., copy: bool = ...) -> dtype[bool_]: ... def __new__(cls, dtype: _BoolCodes | Type[ct.c_bool], align: bool = ..., cop y: bool = ...) -> dtype[bool_]: ...
@overload @overload
def __new__(cls, dtype: _TD64Codes, align: bool = ..., copy: bool = ...) -> dtype[timedelta64]: ... def __new__(cls, dtype: _TD64Codes, align: bool = ..., copy: bool = ...) -> dtype[timedelta64]: ...
@overload @overload
def __new__(cls, dtype: _DT64Codes, align: bool = ..., copy: bool = ...) -> dtype[datetime64]: ... def __new__(cls, dtype: _DT64Codes, align: bool = ..., copy: bool = ...) -> dtype[datetime64]: ...
@overload @overload
def __new__(cls, dtype: _StrCodes, align: bool = ..., copy: bool = ...) -> d type[str_]: ... def __new__(cls, dtype: _StrCodes, align: bool = ..., copy: bool = ...) -> d type[str_]: ...
@overload @overload
def __new__(cls, dtype: _BytesCodes, align: bool = ..., copy: bool = ...) -> dtype[bytes_]: ... def __new__(cls, dtype: _BytesCodes | Type[ct.c_char], align: bool = ..., co py: bool = ...) -> dtype[bytes_]: ...
@overload @overload
def __new__(cls, dtype: _VoidCodes, align: bool = ..., copy: bool = ...) -> dtype[void]: ... def __new__(cls, dtype: _VoidCodes, align: bool = ..., copy: bool = ...) -> dtype[void]: ...
@overload @overload
def __new__(cls, dtype: _ObjectCodes, align: bool = ..., copy: bool = ...) - > dtype[object_]: ... def __new__(cls, dtype: _ObjectCodes | Type[ct.py_object], align: bool = ... , copy: bool = ...) -> dtype[object_]: ...
# dtype of a dtype is the same dtype # dtype of a dtype is the same dtype
@overload @overload
def __new__( def __new__(
cls, cls,
dtype: dtype[_DTypeScalar_co], dtype: dtype[_DTypeScalar_co],
align: bool = ..., align: bool = ...,
copy: bool = ..., copy: bool = ...,
) -> dtype[_DTypeScalar_co]: ... ) -> dtype[_DTypeScalar_co]: ...
@overload @overload
skipping to change at line 1052 skipping to change at line 1058
copy: bool = ..., copy: bool = ...,
) -> dtype[_DTypeScalar_co]: ... ) -> dtype[_DTypeScalar_co]: ...
# Handle strings that can't be expressed as literals; i.e. s1, s2, ... # Handle strings that can't be expressed as literals; i.e. s1, s2, ...
@overload @overload
def __new__( def __new__(
cls, cls,
dtype: str, dtype: str,
align: bool = ..., align: bool = ...,
copy: bool = ..., copy: bool = ...,
) -> dtype[Any]: ... ) -> dtype[Any]: ...
# Catchall overload # Catchall overload for void-likes
@overload @overload
def __new__( def __new__(
cls, cls,
dtype: _VoidDTypeLike, dtype: _VoidDTypeLike,
align: bool = ..., align: bool = ...,
copy: bool = ..., copy: bool = ...,
) -> dtype[void]: ... ) -> dtype[void]: ...
# Catchall overload for object-likes
@overload
def __new__(
cls,
dtype: Type[object],
align: bool = ...,
copy: bool = ...,
) -> dtype[object_]: ...
@overload @overload
def __getitem__(self: dtype[void], key: List[str]) -> dtype[void]: ... def __getitem__(self: dtype[void], key: List[str]) -> dtype[void]: ...
@overload @overload
def __getitem__(self: dtype[void], key: Union[str, int]) -> dtype[Any]: ... def __getitem__(self: dtype[void], key: Union[str, int]) -> dtype[Any]: ...
# NOTE: In the future 1-based multiplications will also yield `void` dtypes # NOTE: In the future 1-based multiplications will also yield `void` dtypes
@overload @overload
def __mul__(self, value: L[0]) -> None: ... # type: ignore[misc] def __mul__(self, value: L[0]) -> None: ... # type: ignore[misc]
@overload @overload
skipping to change at line 1648 skipping to change at line 1662
_ArrayUInt_co = NDArray[Union[bool_, unsignedinteger[Any]]] _ArrayUInt_co = NDArray[Union[bool_, unsignedinteger[Any]]]
_ArrayInt_co = NDArray[Union[bool_, integer[Any]]] _ArrayInt_co = NDArray[Union[bool_, integer[Any]]]
_ArrayFloat_co = NDArray[Union[bool_, integer[Any], floating[Any]]] _ArrayFloat_co = NDArray[Union[bool_, integer[Any], floating[Any]]]
_ArrayComplex_co = NDArray[Union[bool_, integer[Any], floating[Any], complexfloa ting[Any, Any]]] _ArrayComplex_co = NDArray[Union[bool_, integer[Any], floating[Any], complexfloa ting[Any, Any]]]
_ArrayNumber_co = NDArray[Union[bool_, number[Any]]] _ArrayNumber_co = NDArray[Union[bool_, number[Any]]]
_ArrayTD64_co = NDArray[Union[bool_, integer[Any], timedelta64]] _ArrayTD64_co = NDArray[Union[bool_, integer[Any], timedelta64]]
class _SupportsItem(Protocol[_T_co]): class _SupportsItem(Protocol[_T_co]):
def item(self, __args: Any) -> _T_co: ... def item(self, __args: Any) -> _T_co: ...
class _SupportsReal(Protocol[_T_co]):
@property
def real(self) -> _T_co: ...
class _SupportsImag(Protocol[_T_co]):
@property
def imag(self) -> _T_co: ...
class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
@property @property
def base(self) -> Optional[ndarray]: ... def base(self) -> Optional[ndarray]: ...
@property @property
def ndim(self) -> int: ... def ndim(self) -> int: ...
@property @property
def size(self) -> int: ... def size(self) -> int: ...
@property @property
def real(self: _ArraySelf) -> _ArraySelf: ... def real(
self: NDArray[_SupportsReal[_ScalarType]], # type: ignore[type-var]
) -> ndarray[_ShapeType, dtype[_ScalarType]]: ...
@real.setter @real.setter
def real(self, value: ArrayLike) -> None: ... def real(self, value: ArrayLike) -> None: ...
@property @property
def imag(self: _ArraySelf) -> _ArraySelf: ... def imag(
self: NDArray[_SupportsImag[_ScalarType]], # type: ignore[type-var]
) -> ndarray[_ShapeType, dtype[_ScalarType]]: ...
@imag.setter @imag.setter
def imag(self, value: ArrayLike) -> None: ... def imag(self, value: ArrayLike) -> None: ...
def __new__( def __new__(
cls: Type[_ArraySelf], cls: Type[_ArraySelf],
shape: _ShapeLike, shape: _ShapeLike,
dtype: DTypeLike = ..., dtype: DTypeLike = ...,
buffer: _BufferType = ..., buffer: _BufferType = ...,
offset: int = ..., offset: int = ...,
strides: _ShapeLike = ..., strides: _ShapeLike = ...,
order: _OrderKACF = ..., order: _OrderKACF = ...,
skipping to change at line 3063 skipping to change at line 3089
_FloatValue = Union[None, _CharLike_co, SupportsFloat] _FloatValue = Union[None, _CharLike_co, SupportsFloat]
_ComplexValue = Union[ _ComplexValue = Union[
None, None,
_CharLike_co, _CharLike_co,
SupportsFloat, SupportsFloat,
SupportsComplex, SupportsComplex,
complex, complex,
] ]
class integer(number[_NBit1]): # type: ignore class integer(number[_NBit1]): # type: ignore
@property
def numerator(self: _ScalarType) -> _ScalarType: ...
@property
def denominator(self) -> L[1]: ...
@overload
def __round__(self, ndigits: None = ...) -> int: ...
@overload
def __round__(self: _ScalarType, ndigits: SupportsIndex) -> _ScalarType: ...
# NOTE: `__index__` is technically defined in the bottom-most # NOTE: `__index__` is technically defined in the bottom-most
# sub-classes (`int64`, `uint32`, etc) # sub-classes (`int64`, `uint32`, etc)
def item( def item(
self, self,
__args: Union[L[0], Tuple[()], Tuple[L[0]]] = ..., __args: Union[L[0], Tuple[()], Tuple[L[0]]] = ...,
) -> int: ... ) -> int: ...
def tolist(self) -> int: ... def tolist(self) -> int: ...
def __index__(self) -> int: ... def __index__(self) -> int: ...
__truediv__: _IntTrueDiv[_NBit1] __truediv__: _IntTrueDiv[_NBit1]
__rtruediv__: _IntTrueDiv[_NBit1] __rtruediv__: _IntTrueDiv[_NBit1]
skipping to change at line 3136 skipping to change at line 3171
longlong = signedinteger[_NBitLongLong] longlong = signedinteger[_NBitLongLong]
# TODO: `item`/`tolist` returns either `dt.timedelta` or `int` # TODO: `item`/`tolist` returns either `dt.timedelta` or `int`
# depending on the unit # depending on the unit
class timedelta64(generic): class timedelta64(generic):
def __init__( def __init__(
self, self,
__value: Union[None, int, _CharLike_co, dt.timedelta, timedelta64] = ... , __value: Union[None, int, _CharLike_co, dt.timedelta, timedelta64] = ... ,
__format: Union[_CharLike_co, Tuple[_CharLike_co, _IntLike_co]] = ..., __format: Union[_CharLike_co, Tuple[_CharLike_co, _IntLike_co]] = ...,
) -> None: ... ) -> None: ...
@property
def numerator(self: _ScalarType) -> _ScalarType: ...
@property
def denominator(self) -> L[1]: ...
# NOTE: Only a limited number of units support conversion # NOTE: Only a limited number of units support conversion
# to builtin scalar types: `Y`, `M`, `ns`, `ps`, `fs`, `as` # to builtin scalar types: `Y`, `M`, `ns`, `ps`, `fs`, `as`
def __int__(self) -> int: ... def __int__(self) -> int: ...
def __float__(self) -> float: ... def __float__(self) -> float: ...
def __complex__(self) -> complex: ... def __complex__(self) -> complex: ...
def __neg__(self: _ArraySelf) -> _ArraySelf: ... def __neg__(self: _ArraySelf) -> _ArraySelf: ...
def __pos__(self: _ArraySelf) -> _ArraySelf: ... def __pos__(self: _ArraySelf) -> _ArraySelf: ...
def __abs__(self: _ArraySelf) -> _ArraySelf: ... def __abs__(self: _ArraySelf) -> _ArraySelf: ...
def __add__(self, other: _TD64Like_co) -> timedelta64: ... def __add__(self, other: _TD64Like_co) -> timedelta64: ...
skipping to change at line 3205 skipping to change at line 3244
uint64 = unsignedinteger[_64Bit] uint64 = unsignedinteger[_64Bit]
ubyte = unsignedinteger[_NBitByte] ubyte = unsignedinteger[_NBitByte]
ushort = unsignedinteger[_NBitShort] ushort = unsignedinteger[_NBitShort]
uintc = unsignedinteger[_NBitIntC] uintc = unsignedinteger[_NBitIntC]
uintp = unsignedinteger[_NBitIntP] uintp = unsignedinteger[_NBitIntP]
uint0 = unsignedinteger[_NBitIntP] uint0 = unsignedinteger[_NBitIntP]
uint = unsignedinteger[_NBitInt] uint = unsignedinteger[_NBitInt]
ulonglong = unsignedinteger[_NBitLongLong] ulonglong = unsignedinteger[_NBitLongLong]
class inexact(number[_NBit1]): ... # type: ignore class inexact(number[_NBit1]): # type: ignore
def __getnewargs__(self: inexact[_64Bit]) -> Tuple[float, ...]: ...
_IntType = TypeVar("_IntType", bound=integer) _IntType = TypeVar("_IntType", bound=integer)
_FloatType = TypeVar('_FloatType', bound=floating) _FloatType = TypeVar('_FloatType', bound=floating)
class floating(inexact[_NBit1]): class floating(inexact[_NBit1]):
def __init__(self, __value: _FloatValue = ...) -> None: ... def __init__(self, __value: _FloatValue = ...) -> None: ...
def item( def item(
self, self,
__args: Union[L[0], Tuple[()], Tuple[L[0]]] = ..., __args: Union[L[0], Tuple[()], Tuple[L[0]]] = ...,
) -> float: ... ) -> float: ...
def tolist(self) -> float: ... def tolist(self) -> float: ...
def is_integer(self: float64) -> bool: ...
def hex(self: float64) -> str: ...
@classmethod
def fromhex(cls: Type[float64], __string: str) -> float64: ...
def as_integer_ratio(self) -> Tuple[int, int]: ...
if sys.version_info >= (3, 9):
def __ceil__(self: float64) -> int: ...
def __floor__(self: float64) -> int: ...
def __trunc__(self: float64) -> int: ...
def __getnewargs__(self: float64) -> Tuple[float]: ...
def __getformat__(self: float64, __typestr: L["double", "float"]) -> str: ..
.
@overload
def __round__(self, ndigits: None = ...) -> int: ...
@overload
def __round__(self: _ScalarType, ndigits: SupportsIndex) -> _ScalarType: ...
__add__: _FloatOp[_NBit1] __add__: _FloatOp[_NBit1]
__radd__: _FloatOp[_NBit1] __radd__: _FloatOp[_NBit1]
__sub__: _FloatOp[_NBit1] __sub__: _FloatOp[_NBit1]
__rsub__: _FloatOp[_NBit1] __rsub__: _FloatOp[_NBit1]
__mul__: _FloatOp[_NBit1] __mul__: _FloatOp[_NBit1]
__rmul__: _FloatOp[_NBit1] __rmul__: _FloatOp[_NBit1]
__truediv__: _FloatOp[_NBit1] __truediv__: _FloatOp[_NBit1]
__rtruediv__: _FloatOp[_NBit1] __rtruediv__: _FloatOp[_NBit1]
__floordiv__: _FloatOp[_NBit1] __floordiv__: _FloatOp[_NBit1]
__rfloordiv__: _FloatOp[_NBit1] __rfloordiv__: _FloatOp[_NBit1]
skipping to change at line 3261 skipping to change at line 3316
def item( def item(
self, self,
__args: Union[L[0], Tuple[()], Tuple[L[0]]] = ..., __args: Union[L[0], Tuple[()], Tuple[L[0]]] = ...,
) -> complex: ... ) -> complex: ...
def tolist(self) -> complex: ... def tolist(self) -> complex: ...
@property @property
def real(self) -> floating[_NBit1]: ... # type: ignore[override] def real(self) -> floating[_NBit1]: ... # type: ignore[override]
@property @property
def imag(self) -> floating[_NBit2]: ... # type: ignore[override] def imag(self) -> floating[_NBit2]: ... # type: ignore[override]
def __abs__(self) -> floating[_NBit1]: ... # type: ignore[override] def __abs__(self) -> floating[_NBit1]: ... # type: ignore[override]
def __getnewargs__(self: complex128) -> Tuple[float, float]: ...
# NOTE: Deprecated
# def __round__(self, ndigits=...): ...
__add__: _ComplexOp[_NBit1] __add__: _ComplexOp[_NBit1]
__radd__: _ComplexOp[_NBit1] __radd__: _ComplexOp[_NBit1]
__sub__: _ComplexOp[_NBit1] __sub__: _ComplexOp[_NBit1]
__rsub__: _ComplexOp[_NBit1] __rsub__: _ComplexOp[_NBit1]
__mul__: _ComplexOp[_NBit1] __mul__: _ComplexOp[_NBit1]
__rmul__: _ComplexOp[_NBit1] __rmul__: _ComplexOp[_NBit1]
__truediv__: _ComplexOp[_NBit1] __truediv__: _ComplexOp[_NBit1]
__rtruediv__: _ComplexOp[_NBit1] __rtruediv__: _ComplexOp[_NBit1]
__floordiv__: _ComplexOp[_NBit1] __floordiv__: _ComplexOp[_NBit1]
__rfloordiv__: _ComplexOp[_NBit1] __rfloordiv__: _ComplexOp[_NBit1]
 End of changes. 42 change blocks. 
36 lines changed or deleted 95 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)