+
    ei	  c                   s    R t ^ RIHtHtHtHtHt ]'       d   ^ RIHt R.t	]! RRR7      t
] ! R R]]
,          4      4       tR# )	z3A module containing the `_NestedSequence` protocol.)TYPE_CHECKINGAnyProtocolTypeVarruntime_checkable)Iterator_NestedSequence_T_coT)Z	covariantc                   s   a  ] tR t^t o RtV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR	 ltV 3R
 lR lt	V 3R lR lt
V 3R lR ltRtV tR# )r   aP  A protocol for representing nested sequences.

Warning
-------
`_NestedSequence` currently does not work in combination with typevars,
*e.g.* ``def func(a: _NestedSequnce[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]]

c                s    < V ^8  d   QhRS[ /# )   returnintZformat__classdict__   "E/usr/lib64/python3.14/site-packages/numpy/_typing/_nested_sequence.py__annotate___NestedSequence.__annotate__5   s     " "C "    c                   \         h)zImplement ``len(self)``.ZNotImplementedErrorself   "r   __len__Z_NestedSequence.__len__5       !!r   c                s$   < V ^8  d   QhRS[ RR/# )r   indexr	   z_T_co | _NestedSequence[_T_co]r
   r   r   r   r   r   9   s     " " ",L "r   c               r   )zImplement ``self[x]``.r   )r   r      ""r   __getitem__Z_NestedSequence.__getitem__9   r   r   c                &   < V ^8  d   QhRS[ RS[/# )r   xr	   )ZobjectZboolr   r   r   r   r   =   s     " "f "D "r   c               r   )zImplement ``x in self``.r   )r   r   r   r   __contains__Z_NestedSequence.__contains__=   r   r   c                   < V ^8  d   QhRR/# r   r	   z(Iterator[_T_co | _NestedSequence[_T_co]] r   r   r   r   r   A   s     " "G "r   c               r   )zImplement ``iter(self)``.r   r   r   r   __iter__Z_NestedSequence.__iter__A   r   r   c                r    r!   r"   r   r   r   r   r   E   s     " "!K "r   c               r   )zImplement ``reversed(self)``.r   r   r   r   __reversed__Z_NestedSequence.__reversed__E   r   r   c                r   r   valuer	   r   r   r   r   r   r   r   I        " "3 "c "r   c               r   )z,Return the number of occurrences of `value`.r   r   r&   r   r   countZ_NestedSequence.countI   r   r   c                r   r%   r'   r   r   r   r   r   M   r(   r   c               r   )z"Return the first index of `value`.r   r)   r   r   r   Z_NestedSequence.indexM   r   r   r"   N)Z__name__Z
__module__Z__qualname__Z__firstlineno____doc__r   r   r   r#   r$   r*   r   Z__static_attributes__Z__classdictcell__)r   s   @r   r   r      sQ     $L" "" "" "" "" "" "" "r   N)r+   Ztypingr    r   r   r   r   Zcollections.abcr   Z__all__r   r   r"   r   r   <module>r,      sJ    9 K K(
4( A"huo A" A"r   