Alle Dateien aus dem Pythonkurs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
334 B

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),
}
)