Intelegentny_Pszczelarz/.venv/Lib/site-packages/numpy/typing/tests/data/fail/dtype.pyi

21 lines
334 B
Python
Raw Normal View History

2023-06-19 00:49:18 +02:00
import numpy as np
class Test1:
not_dtype = np.dtype(float)
class Test2:
dtype = float
np.dtype(Test1()) # E: No overload variant of "dtype" matches
np.dtype(Test2()) # E: incompatible type
np.dtype( # E: No overload variant of "dtype" matches
{
"field1": (float, 1),
"field2": (int, 3),
}
)