1j[fdZddlmZddlmZddlmZddlmZm Z e edGdd Z Gd d e Z Gd d e Z Gdde Z Gdde ZGddeZGddeZGddeZGddeZddlmZddlmZmZmZmZmZmZmZmZmZmZddl m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;mZ>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGddlHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZRddlSmTZTmUZUdd lVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z]m^Z^m_Z_m`Z`maZambZbmcZcmdZdmeZemfZfdd!lgmhZhmiZimjZjmkZkmlZlmmZmmnZnmoZompZpmqZqmrZrmsZsmtZtmuZumvZvmwZwmxZxmyZymzZzm{Z{m|Z|erdd"l}m~Z~mZmZmZmZd#SeZ~eZeZeZeZd#S)$z(Private counterpart of ``numpy.typing``.) annotations)ufunc) set_module) TYPE_CHECKINGfinalz numpy.typingc$eZdZdZdfd ZxZS)NBitBasea A type representing `numpy.number` precision during static type checking. Used exclusively for the purpose static type checking, `NBitBase` represents the base of a hierarchical set of subclasses. Each subsequent subclass is herein used for representing a lower level of precision, *e.g.* ``64Bit > 32Bit > 16Bit``. .. versionadded:: 1.20 Examples -------- Below is a typical usage example: `NBitBase` is herein used for annotating a function that takes a float and integer of arbitrary precision as arguments and returns a new float of whichever precision is largest (*e.g.* ``np.float16 + np.int64 -> np.float64``). .. code-block:: python >>> from __future__ import annotations >>> from typing import TypeVar, TYPE_CHECKING >>> import numpy as np >>> import numpy.typing as npt >>> T1 = TypeVar("T1", bound=npt.NBitBase) >>> T2 = TypeVar("T2", bound=npt.NBitBase) >>> def add(a: np.floating[T1], b: np.integer[T2]) -> np.floating[T1 | T2]: ... return a + b >>> a = np.float16() >>> b = np.int64() >>> out = add(a, b) >>> if TYPE_CHECKING: ... reveal_locals() ... # note: Revealed local types are: ... # note: a: numpy.floating[numpy.typing._16Bit*] ... # note: b: numpy.signedinteger[numpy.typing._64Bit*] ... # note: out: numpy.floating[numpy.typing._64Bit*] returnNonechd}|j|vrtdtdS)N> _8Bit_16Bit_32Bit_64Bit_80Bit_96Bit_128Bit_256Bitr z*cannot inherit from final class "NBitBase")__name__ TypeErrorsuper__init_subclass__)cls allowed_names __class__s M/opt/cloudlinux/venv/lib64/python3.11/site-packages/numpy/_typing/__init__.pyrzNBitBase.__init_subclass__8sN    <} , ,HII I !!#####)r r )r __module__ __qualname____doc__r __classcell__)rs@rr r sH))V$$$$$$$$$$rr ceZdZdS)rNrrr rrrrCDrrceZdZdS)rNr$r%rrrrFr&rrceZdZdS)rNr$r%rrrrIr&rrceZdZdS)rNr$r%rrrrLr&rrceZdZdS)rNr$r%rrrrOr&rrceZdZdS)rNr$r%rrrrRr&rrceZdZdS)rNr$r%rrrrUr&rrceZdZdS)rNr$r%rrrrXr&rr)_NestedSequence) _NBitByte _NBitShort _NBitIntC _NBitIntP_NBitInt _NBitLongLong _NBitHalf _NBitSingle _NBitDouble_NBitLongDouble)' _BoolCodes _UInt8Codes _UInt16Codes _UInt32Codes _UInt64Codes _Int8Codes _Int16Codes _Int32Codes _Int64Codes _Float16Codes _Float32Codes _Float64Codes_Complex64Codes_Complex128Codes _ByteCodes _ShortCodes _IntCCodes _IntPCodes _IntCodes_LongLongCodes _UByteCodes _UShortCodes _UIntCCodes _UIntPCodes _UIntCodes_ULongLongCodes _HalfCodes _SingleCodes _DoubleCodes_LongDoubleCodes _CSingleCodes _CDoubleCodes_CLongDoubleCodes _DT64Codes _TD64Codes _StrCodes _BytesCodes _VoidCodes _ObjectCodes) _CharLike_co _BoolLike_co _UIntLike_co _IntLike_co _FloatLike_co_ComplexLike_co _TD64Like_co_NumberLike_co_ScalarLike_co _VoidLike_co)_Shape _ShapeLike) DTypeLike _DTypeLike_SupportsDType_VoidDTypeLike_DTypeLikeBool_DTypeLikeUInt _DTypeLikeInt_DTypeLikeFloat_DTypeLikeComplex_DTypeLikeTD64_DTypeLikeDT64_DTypeLikeObject_DTypeLikeVoid _DTypeLikeStr_DTypeLikeBytes_DTypeLikeComplex_co)NDArray ArrayLike _ArrayLike_FiniteNestedSequence_SupportsArray_SupportsArrayFunc _ArrayLikeInt_ArrayLikeBool_co_ArrayLikeUInt_co_ArrayLikeInt_co_ArrayLikeFloat_co_ArrayLikeComplex_co_ArrayLikeNumber_co_ArrayLikeTD64_co_ArrayLikeDT64_co_ArrayLikeObject_co_ArrayLikeVoid_co_ArrayLikeStr_co_ArrayLikeBytes_co_ArrayLikeUnknown _UnknownType)_UFunc_Nin1_Nout1_UFunc_Nin2_Nout1_UFunc_Nin1_Nout2_UFunc_Nin2_Nout2_GUFunc_Nin2_Nout1N)r! __future__rr_utilsrtypingrrr rrrrrrrr_nested_sequencer/_nbitr0r1r2r3r4r5r6r7r8r9 _char_codesr:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`_scalarsrarbrcrdrerfrgrhrirj_shaperkrl _dtype_likermrnrorprqrrrsrtrurvrwrxryrzr{r| _array_liker}r~rrrrrrrrrrrrrrrrrrr_ufuncrrrrrr%rrrs..""""""'''''''' N3$3$3$3$3$3$3$3$n     h        g        W        V        V        V        V        F                           ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((R                        $0r