https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/numpy/typing/tests/data/reveal/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/numpy/typing/tests/data/reveal/arrayterator.py
from typing import Any
import numpy as np

AR_i8: np.ndarray[Any, np.dtype[np.int64]]
ar_iter = np.lib.Arrayterator(AR_i8)

reveal_type(ar_iter.var)  # E: numpy.ndarray[Any, numpy.dtype[{int64}]]
reveal_type(ar_iter.buf_size)  # E: Union[None, builtins.int]
reveal_type(ar_iter.start)  # E: builtins.list[builtins.int]
reveal_type(ar_iter.stop)  # E: builtins.list[builtins.int]
reveal_type(ar_iter.step)  # E: builtins.list[builtins.int]
reveal_type(ar_iter.shape)  # E: builtins.tuple[builtins.int]
reveal_type(ar_iter.flat)  # E: typing.Generator[{int64}, None, None]

reveal_type(ar_iter.__array__())  # E: numpy.ndarray[Any, numpy.dtype[{int64}]]

for i in ar_iter:
    reveal_type(i)  # E: numpy.ndarray[Any, numpy.dtype[{int64}]]

reveal_type(ar_iter[0])  # E: numpy.lib.arrayterator.Arrayterator[Any, numpy.dtype[{int64}]]
reveal_type(ar_iter[...])  # E: numpy.lib.arrayterator.Arrayterator[Any, numpy.dtype[{int64}]]
reveal_type(ar_iter[:])  # E: numpy.lib.arrayterator.Arrayterator[Any, numpy.dtype[{int64}]]
reveal_type(ar_iter[0, 0, 0])  # E: numpy.lib.arrayterator.Arrayterator[Any, numpy.dtype[{int64}]]
reveal_type(ar_iter[..., 0, :])  # E: numpy.lib.arrayterator.Arrayterator[Any, numpy.dtype[{int64}]]

https://t.me/RX1948 - 2025