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

Numpy 1.20 DeprecationWarning: np.float is a deprecated alias for the builtin float. #90

Closed
timeisapear opened this issue Apr 30, 2021 · 1 comment · Fixed by #91
Closed
Assignees

Comments

@timeisapear
Copy link

timeisapear commented Apr 30, 2021

Hello,

Using numpy 1.20 seeing a DeprecationWarning traced to https://github.com/tommyod/KDEpy/blob/master/KDEpy/binning.py#L79

Probably a simple change needed to change np.float to np.float64 or float, as noted in the warning.

Thanks for this package.

Stacktrace:

/Users/delaurentis/miniconda3/envs/dra/lib/python3.7/site-packages/KDEpy/binning.py:79: 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
  data = np.asarray_chkfinite(data, dtype=np.float)
@tommyod tommyod self-assigned this Apr 30, 2021
@tommyod
Copy link
Owner

tommyod commented Apr 30, 2021

Thanks for reporting this. If you want you are welcome to create a PR. If not I will get around to it sometime.

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