Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting scalars from numpy arrays #24

Open
joshua-cogliati-inl opened this issue Jul 3, 2018 · 0 comments
Open

Getting scalars from numpy arrays #24

joshua-cogliati-inl opened this issue Jul 3, 2018 · 0 comments

Comments

@joshua-cogliati-inl
Copy link

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]"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant