ó
    SBìg@  ã                   ó  • S r SSKJr  SSKJr  \\" S5       " S S5      5       5       r\\" S5       " S	 S
\5      5       5       r\\" S5       " S S\5      5       5       r\\" S5       " S S\5      5       5       r\\" S5       " S S\5      5       5       r	\\" S5       " S S\	5      5       5       r
\\" S5       " S S\
5      5       5       r\\" S5       " S S\5      5       5       r\\" S5       " S S\5      5       5       rg)z>A module with the precisions of generic `~numpy.number` types.é   )Ú
set_moduleé    )Úfinalznumpy.typingc                   ó0   ^ • \ rS rSrSrSU 4S jjrSrU =r$ )ÚNBitBaseé   aY  
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

    >>> S = TypeVar("S", bound=npt.NBitBase)
    >>> T = TypeVar("T", bound=npt.NBitBase)

    >>> def add(a: np.floating[S], b: np.integer[T]) -> np.floating[S | T]:
    ...     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*]

c                 ó`   >• 1 SknU R                   U;  a  [        S5      e[        TU ]  5         g )N>	   Ú_8BitÚ_16BitÚ_32BitÚ_64BitÚ_80BitÚ_96BitÚ_128BitÚ_256Bitr   z*cannot inherit from final class "NBitBase")Ú__name__Ú	TypeErrorÚsuperÚ__init_subclass__)ÚclsÚallowed_namesÚ	__class__s     €Ú:/usr/lib/python3/dist-packages/numpy/_typing/_nbit_base.pyr   ÚNBitBase.__init_subclass__4   s/   ø€ ò
ˆð <‰<˜}Ó,ÜÐHÓIÐIÜ‰Ñ!Õ#ó    © )ÚreturnN)r   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Ú__static_attributes__Ú__classcell__)r   s   @r   r   r      s   ø† ñ)÷V$õ $r   r   znumpy._typingc                   ó   • \ rS rSrSrg)r   é=   r   N©r   r   r   r    r"   r   r   r   r   r   =   s   † ò 	r   r   c                   ó   • \ rS rSrSrg)r   éC   r   Nr&   r   r   r   r   r   C   ó   † ò 	r   r   c                   ó   • \ rS rSrSrg)r   éH   r   Nr&   r   r   r   r   r   H   r)   r   r   c                   ó   • \ rS rSrSrg)r   éM   r   Nr&   r   r   r   r   r   M   r)   r   r   c                   ó   • \ rS rSrSrg)r   éR   r   Nr&   r   r   r   r   r   R   r)   r   r   c                   ó   • \ rS rSrSrg)r   éW   r   Nr&   r   r   r   r   r   W   r)   r   r   c                   ó   • \ rS rSrSrg)r   é\   r   Nr&   r   r   r   r   r   \   r)   r   r   c                   ó   • \ rS rSrSrg)r
   éa   r   Nr&   r   r   r   r
   r
   a   r)   r   r
   N)r!   Ú_utilsr   Útypingr   r   r   r   r   r   r   r   r   r
   r   r   r   Ú<module>r8      su  ðÙ DÝ Ý ð ÙˆNÓ÷3$ð 3$ó ó ð3$ðj ÙˆOÓô	ˆhó 	ó ó ð	ð ÙˆOÓô	ˆgó 	ó ó ð	ð ÙˆOÓô	ˆWó 	ó ó ð	ð ÙˆOÓô	ˆVó 	ó ó ð	ð ÙˆOÓô	ˆVó 	ó ó ð	ð ÙˆOÓô	ˆVó 	ó ó ð	ð ÙˆOÓô	ˆVó 	ó ó ð	ð ÙˆOÓô	ˆFó 	ó ó ñ	r   