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

编程入门 行业动态 更新时间:2024-10-23 15:19:16

[已解决]AttributeError: <a href=https://www.elefans.com/category/jswz/34/1770873.html style=module ‘numpy‘ has no attribute ‘float‘"/>

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

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: .20.0-notes.html#deprecations

2、解决方法[参考]

conda list 

降低numpy 版本:

pip uninstall numpy
pip install numpy==1.23.5

更多推荐

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

本文发布于:2023-11-17 11:19:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1643214.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:module   AttributeError   numpy   float   attribute

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!