当前位置:   article > 正文

[已解决]AttributeError: module ‘numpy‘ has no attribute ‘float‘_attributeerror: module 'numpy' has no attribute 'f

attributeerror: module 'numpy' has no attribute 'float'. `np.float` was a de

1、问题: 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

2、解决方法[参考]

conda list 

降低numpy 版本

  1. pip uninstall numpy
  2. pip install numpy==1.23.5

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/448971
推荐阅读
相关标签
  

闽ICP备14008679号