hyb
2026-01-30 15bc7727b58bf9ca0c8f21702fa893daac232b8d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import numpy as np
 
class Test1:
    not_dtype = np.dtype(float)
 
class Test2:
    dtype = float
 
np.dtype(Test1())  # type: ignore[call-overload]
np.dtype(Test2())  # type: ignore[arg-type]
 
np.dtype(  # type: ignore[call-overload]
    {
        "field1": (float, 1),
        "field2": (int, 3),
    }
)