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

Fix Numpy 1.20 Deprecation Warning in cocoeval.py #505

Open
dketterer opened this issue Apr 8, 2021 · 1 comment · May be fixed by #624
Open

Fix Numpy 1.20 Deprecation Warning in cocoeval.py #505

dketterer opened this issue Apr 8, 2021 · 1 comment · May be fixed by #624

Comments

@dketterer
Copy link

When I run the Python evaluation with Numpy 1.20 I get this DeprecationWarning in cocoeval.py line 378 and 379:

/pycocotools/cocoeval.py:378: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, 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.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  tp_sum = np.cumsum(tps, axis=1).astype(dtype=np.float)

Please see the Numpy Documentation for details.

The np.float should exchanged for float.

@sadra-barikbin sadra-barikbin linked a pull request Nov 29, 2022 that will close this issue
@sadra-barikbin
Copy link

@tylin , could you please fix this issue? I made the PR. In higher versions of Numpy and python, this actually raises error.

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 a pull request may close this issue.

2 participants