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

Do proper typetesting for np.floats #327

Merged
merged 1 commit into from
Oct 12, 2020
Merged

Do proper typetesting for np.floats #327

merged 1 commit into from
Oct 12, 2020

Conversation

JoranAngevaare
Copy link
Contributor

What is the problem / what does the code in this PR do
Solves issue: #326

Can you briefly describe how it works?
See:
https://stackoverflow.com/questions/28292542/how-to-check-if-a-number-is-a-np-float64-or-np-float32-or-np-float16

Can you give a minimal working example (or illustrate with a figure)?

d = np.float32(1)
isinstance(d, np.float), isinstance(d, np.floating)
# returns
(False, True)

@JoranAngevaare JoranAngevaare linked an issue Oct 9, 2020 that may be closed by this pull request
Copy link
Collaborator

@WenzDaniel WenzDaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch

@WenzDaniel WenzDaniel merged commit 9172bc7 into master Oct 12, 2020
@JoranAngevaare JoranAngevaare deleted the jorana-patch-1 branch October 12, 2020 09:13
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

Successfully merging this pull request may close these issues.

Floats in mongo.py not removed
2 participants