fourMs / MGT-python

Musical Gestures Toolbox for Python
https://www.uio.no/ritmo/english/research/labs/fourms/downloads/software/musicalgesturestoolbox/mgt-python/index.html
GNU General Public License v3.0
53 stars 11 forks source link

Float bug in new numpy #297

Closed alexarje closed 1 year ago

alexarje commented 1 year ago

I upgraded to a new numpy package and get an error with average()

AttributeError: module 'numpy' has no attribute 'float'. np.floatwas a deprecated alias for the builtinfloat. To avoid this error in existing code, usefloatby itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, usenp.float64` here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

`

joachimpoutaraud commented 1 year ago

Thanks for reporting the issue. I have updated the _average.py script which contained np.float variables to np.float32. I also checked if there was no np.int variable that are also deprecated.