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
from typing import Any, TypeVar
 
import numpy as np
import numpy.typing as npt
 
def func1(ar: npt.NDArray[Any], a: int) -> npt.NDArray[np.str_]: ...
 
def func2(ar: npt.NDArray[Any], a: float) -> float: ...
 
AR_b: npt.NDArray[np.bool]
AR_m: npt.NDArray[np.timedelta64]
 
AR_LIKE_b: list[bool]
 
np.eye(10, M=20.0)  # type: ignore[call-overload]
np.eye(10, k=2.5, dtype=int)  # type: ignore[call-overload]
 
np.diag(AR_b, k=0.5)  # type: ignore[call-overload]
np.diagflat(AR_b, k=0.5)  # type: ignore[call-overload]
 
np.tri(10, M=20.0)  # type: ignore[call-overload]
np.tri(10, k=2.5, dtype=int)  # type: ignore[call-overload]
 
np.tril(AR_b, k=0.5)  # type: ignore[call-overload]
np.triu(AR_b, k=0.5)  # type: ignore[call-overload]
 
np.vander(AR_m)  # type: ignore[arg-type]
 
np.histogram2d(AR_m)  # type: ignore[call-overload]
 
np.mask_indices(10, func1)  # type: ignore[arg-type]
np.mask_indices(10, func2, 10.5)  # type: ignore[arg-type]