hyb
2026-01-09 4cb426cb3ae31e772a09d4ade5b2f0242aaeefa0
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),
    }
)