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

Error in cocoeval.py: Deprecated attribute np.float used, should be replaced with float | line 378 #665

Open
cori4nder opened this issue Mar 4, 2024 · 2 comments

Comments

@cori4nder
Copy link

Hello,

I encountered an error while using the cocoeval.py module from the COCO API. The error message indicates the usage of a deprecated attribute np.float, which should be replaced with float to avoid future compatibility issues.

Error message:

AttributeError: module 'numpy' has no attribute 'float'.
np.float was a deprecated alias for the builtin float. To avoid this error in existing code, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here.


To fix this issue, I suggest replacing the line of code in cocoeval.py that contains np.float with float.

Thank you for your attention to this matter.

@windymv025
Copy link

Same issues

@gurudk
Copy link

gurudk commented Jun 26, 2024

Just install use pip: pip install pycocotools, it works for me.
Installing from git is for backward compatibility.

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

3 participants