lebedov / scikit-cuda

Python interface to GPU-powered libraries
http://scikit-cuda.readthedocs.org/
Other
975 stars 179 forks source link

np.float() is deprecated in NumPy 1.20, which is used in misc.py #314

Closed zzjjbb closed 3 years ago

zzjjbb commented 3 years ago

Problem

This line trigger a warning from numpy:

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

I think this means float('.'.join([str(i) for i in dev.compute_capability()])) should be used rather than np.float(...) for future compatibility.

Environment

Python 3.8.5, NumPy 1.20, scikit-cuda 0.5.3 from PyPI (I guess the version of other library is not important)

lebedov commented 3 years ago

Fixed.