Skip to content

np.float is depricated in numpy 1.24 #130

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

Merged
merged 2 commits into from
Mar 1, 2023

Conversation

razdoburdin
Copy link
Collaborator

np.float is depricated in numpy 1.24

@@ -23,7 +23,7 @@ def get_accuracy(true_labels, prediction):
errors = 0
for i, true_label in enumerate(true_labels):
pred_label = 0
if isinstance(prediction[i], (float, np.single, np.float)):
if isinstance(prediction[i], (float, np.single)):
Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to specify more familiar type names

Suggested change
if isinstance(prediction[i], (float, np.single)):
if isinstance(prediction[i], (np.float32, np.float64)):

@Alexsandruss Alexsandruss merged commit af05b1b into IntelPython:master Mar 1, 2023
@razdoburdin razdoburdin deleted the float_update branch March 1, 2023 13:50
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.

2 participants