使用deepspeech做音频特征提取时报错
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.
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. Did you mean: 'cfloat'?
出现这个问题是因为np.float从1.24起被删除。所用的代码是依赖于旧版本的Numpy。可以将Numpy版本降级到1.23.5.
解决办法
pip install numpy==1.23.5
标签:use,12,deprecated,Numpy,float,软件工程,2023,np,numpy From: https://www.cnblogs.com/wzs-study/p/17872040.html