hyb
2026-01-09 4cb426cb3ae31e772a09d4ade5b2f0242aaeefa0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Ë
Kñúh
ãót—dZddlmZmZmZmZmZerddlmZdgZ    edd¬«Z
eGd„dee
««Z y    )
z3A module containing the `_NestedSequence` protocol.é)Ú TYPE_CHECKINGÚAnyÚProtocolÚTypeVarÚruntime_checkable)ÚIteratorÚ_NestedSequenceÚ_T_coT)Ú    covariantcól—eZdZdZdefd„Zdeddfd„Zdedefd„Z    dd    „Z
dd
„Z d e defd „Z d e defd „Zy)r    aÀ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]]
 
    Úreturncó—t‚)zImplement ``len(self)``.©ÚNotImplementedError©Úselfs úQH:\Change_password\venv_build\Lib\site-packages\numpy/_typing/_nested_sequence.pyÚ__len__z_NestedSequence.__len__5ó€ä!Ð!óÚindexz_T_co | _NestedSequence[_T_co]có—t‚)zImplement ``self[x]``.r)rrs  rÚ __getitem__z_NestedSequence.__getitem__9rrÚxcó—t‚)zImplement ``x in self``.r)rrs  rÚ __contains__z_NestedSequence.__contains__=rrcó—t‚)zImplement ``iter(self)``.rrs rÚ__iter__z_NestedSequence.__iter__Arrcó—t‚)zImplement ``reversed(self)``.rrs rÚ __reversed__z_NestedSequence.__reversed__ErrÚvaluecó—t‚)z,Return the number of occurrences of `value`.r©rr!s  rÚcountz_NestedSequence.countIrrcó—t‚)z"Return the first index of `value`.rr#s  rrz_NestedSequence.indexMrrN)r z(Iterator[_T_co | _NestedSequence[_T_co]])Ú__name__Ú
__module__Ú __qualname__Ú__doc__ÚintrrÚobjectÚboolrrr rr$r©rrr    r     sk„ñ$ðL"˜Có"ð" ð"Ð,Ló"ð"˜fð"¨Dó"ó"ó"ð"˜3ð" có"ð"˜3ð" cô"rN) r)ÚtypingrrrrrÚcollections.abcrÚ__all__r
r    r-rrú<module>r1sJðÙ9çKÕKáÝ(à Ð
€á 4Ô(€ðôA"h˜u‘oóA"óñA"r