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

Type checking for floats fails on numpy floats #103

Closed
MassimoCimmino opened this issue May 18, 2021 · 0 comments · Fixed by #105
Closed

Type checking for floats fails on numpy floats #103

MassimoCimmino opened this issue May 18, 2021 · 0 comments · Fixed by #105
Labels

Comments

@MassimoCimmino
Copy link
Owner

MassimoCimmino commented May 18, 2021

The statement type(x) is float returns false if x is np.float64 (or other numpy types).

The proper statement is isinstance(x, (float, np.floating)).

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

Successfully merging a pull request may close this issue.

1 participant