Skip to content
New issue

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

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

Already on GitHub? # to your account

[Fix] np.float as it is deprecated #2527

Merged
merged 1 commit into from
May 17, 2023

Conversation

filaPro
Copy link
Contributor

@filaPro filaPro commented May 14, 2023

np.float is removed from numpy

@codecov
Copy link

codecov bot commented May 14, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (737c29f) 46.99% compared to head (91248e8) 46.99%.

❗ Current head 91248e8 differs from pull request most recent head dbe698c. Consider uploading reports for the commit dbe698c to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           dev-1.x    #2527   +/-   ##
========================================
  Coverage    46.99%   46.99%           
========================================
  Files          276      276           
  Lines        23144    23144           
  Branches      3611     3611           
========================================
  Hits         10877    10877           
  Misses       11579    11579           
  Partials       688      688           
Flag Coverage Δ
unittests 46.99% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...tional/scannet_utils/evaluate_semantic_instance.py 86.84% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -25,8 +25,7 @@ def evaluate_matches(matches, class_labels, options):
dist_confs = [options['distance_confs'][0]]

# results: class x overlap
ap = np.zeros((len(dist_threshes), len(class_labels), len(overlaps)),
np.float)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggest to change np.float to np.float32

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like the default dtype for np.zeros is float which according to numpy documentation means exactly the same as old np.float. Why do we want to specify np.float32?

Copy link
Collaborator

Choose a reason for hiding this comment

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

We expect to keep dtype to make the code more readable.

@JingweiZhang12 JingweiZhang12 merged commit 22aaa47 into open-mmlab:dev-1.x May 17, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants