[已解决]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: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

2、解决方法[参考]

conda list

降低numpy 版本:

python 复制代码
pip uninstall numpy
pip install numpy==1.23.5
相关推荐
CH3_CH2_CHO4 小时前
不吃【Numpy】版
开发语言·python·numpy
黎明沐白2 天前
PyTorch源码编译报错“fatal error: numpy/arrayobject.h: No such file or directory”
人工智能·pytorch·numpy
NorthFish北海有鱼3 天前
python三维矩阵的维度
python·矩阵·numpy
浅浅2804 天前
numpy、pandas内存优化操作整理
数据结构·经验分享·python·学习·性能优化·numpy·pandas
帮帮志4 天前
07.Python代码NumPy-排序sort,argsort,lexsort
numpy
秋凉花落4 天前
课堂总结。
numpy
架构师那点事儿5 天前
人工智能基础-NumPy-向量矩阵数组库
人工智能·python·numpy
跟着杰哥学Python5 天前
一文读懂Python之numpy模块(34)
开发语言·python·numpy
热爱编程的OP9 天前
Numpy常用库方法总结
开发语言·python·numpy
ljd21032312412 天前
numpy练习
numpy