hyb
2025-12-23 10f3a1daddfbc7fa3dd2069197d83e8b6ef19176
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import numpy as np
import numpy._typing as npt
 
class Index:
    def __index__(self) -> int: ...
 
a: np.flatiter[npt.NDArray[np.float64]]
supports_array: npt._SupportsArray[np.dtype[np.float64]]
 
a.base = object()  # type: ignore[assignment, misc]
a.coords = object()  # type: ignore[assignment, misc]
a.index = object()  # type: ignore[assignment, misc]
a.copy(order='C')  # type: ignore[call-arg]
 
# NOTE: Contrary to `ndarray.__getitem__` its counterpart in `flatiter`
# does not accept objects with the `__array__` or `__index__` protocols;
# boolean indexing is just plain broken (gh-17175)
a[np.bool()]  # type: ignore[index]
a[Index()]  # type: ignore[call-overload]
a[supports_array]  # type: ignore[index]