mypy-data
mypy-data copied to clipboard
Getting scalars from numpy arrays
Getting a scalar from a numpy array does not seem to be supported.
import numpy
b : float = float(numpy.array(1))
with mypy gets the error:
error: Argument 1 to "float" has incompatible type "ndarray[Any]"; expected "Union[SupportsFloat, str, bytes]"