Ë
    &�£j¥
  ã                   ó    — d Z ddlmZmZmZmZ erddlmZ ddlm	Z	  e	dde¬«      Z
nddlm	Z	  e	dd¬«      Z
d	gZe G d
„ d	ee
   «      «       Zy)z3A module containing the `_NestedSequence` protocol.é    )ÚTYPE_CHECKINGÚAnyÚProtocolÚruntime_checkable)ÚIterator)ÚTypeVarÚ_T_coT)Ú	covariantÚdefault)r
   Ú_NestedSequencec                   ól   — e Zd ZdZdefd„Zdeddfd„Zdedefd„Z	dd	„Z
dd
„Zdedefd„Zdedefd„Zy)r   aÁ  A protocol for representing nested sequences.

    Warning
    -------
    `_NestedSequence` currently does not work in combination with typevars,
    *e.g.* ``def func(a: _NestedSequence[T]) -> T: ...``.

    See Also
    --------
    collections.abc.Sequence
        ABCs for read-only and mutable :term:`sequences`.

    Examples
    --------
    .. code-block:: python

        >>> from typing import TYPE_CHECKING
        >>> import numpy as np
        >>> from numpy._typing import _NestedSequence

        >>> def get_dtype(seq: _NestedSequence[float]) -> np.dtype[np.float64]:
        ...     return np.asarray(seq).dtype

        >>> a = get_dtype([1.0])
        >>> b = get_dtype([[1.0]])
        >>> c = get_dtype([[[1.0]]])
        >>> d = get_dtype([[[[1.0]]]])

        >>> if TYPE_CHECKING:
        ...     reveal_locals()
        ...     # note: Revealed local types are:
        ...     # note:     a: numpy.dtype[numpy.floating[numpy._typing._64Bit]]
        ...     # note:     b: numpy.dtype[numpy.floating[numpy._typing._64Bit]]
        ...     # note:     c: numpy.dtype[numpy.floating[numpy._typing._64Bit]]
        ...     # note:     d: numpy.dtype[numpy.floating[numpy._typing._64Bit]]

    Úreturnc                ó   — t         ‚)zImplement ``len(self)``.©ÚNotImplementedError©Úselfs    ú@C:\FundamentalWorkbench\vendor\numpy\_typing\_nested_sequence.pyÚ__len__z_NestedSequence.__len__;   ó   € ä!Ð!ó    Úindexz_T_co | _NestedSequence[_T_co]c                ó   — t         ‚)zImplement ``self[x]``.r   )r   r   s     r   Ú__getitem__z_NestedSequence.__getitem__?   r   r   Úxc                ó   — t         ‚)zImplement ``x in self``.r   )r   r   s     r   Ú__contains__z_NestedSequence.__contains__C   r   r   c                ó   — t         ‚)zImplement ``iter(self)``.r   r   s    r   Ú__iter__z_NestedSequence.__iter__G   r   r   c                ó   — t         ‚)zImplement ``reversed(self)``.r   r   s    r   Ú__reversed__z_NestedSequence.__reversed__K   r   r   Úvaluec                ó   — t         ‚)z,Return the number of occurrences of `value`.r   ©r   r"   s     r   Úcountz_NestedSequence.countO   r   r   c                ó   — t         ‚)z"Return the first index of `value`.r   r$   s     r   r   z_NestedSequence.indexS   r   r   N)r   z(Iterator[_T_co | _NestedSequence[_T_co]])Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úintr   r   ÚobjectÚboolr   r   r!   r   r%   r   © r   r   r   r      sk   „ ñ$ðL"˜Có "ð" ð "Ð,Ló "ð"˜fð "¨Dó "ó"ó"ð"˜3ð " có "ð"˜3ð " cô "r   N)r*   Útypingr   r   r   r   Úcollections.abcr   Útyping_extensionsr   r	   Ú__all__r   r.   r   r   Ú<module>r3      s`   ðÙ 9ç BÓ BáÝ(Ý)á�G t°SÔ9�Eåá�G tÔ,€Eð Ð
€ð ôA"�h˜u‘oó A"ó ñA"r   