[已解决]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
相关推荐
jie*2 天前
小杰深度学习(five)——正则化、神经网络的过拟合解决方案
人工智能·python·深度学习·神经网络·numpy·matplotlib
西猫雷婶2 天前
random.shuffle()函数随机打乱数据
开发语言·pytorch·python·学习·算法·线性回归·numpy
MoRanzhi12033 天前
0. NumPy 系列教程:科学计算与数据分析实战
人工智能·python·机器学习·数据挖掘·数据分析·numpy·概率论
万粉变现经纪人5 天前
如何解决 pip install 安装报错 ModuleNotFoundError: No module named ‘flax’ 问题
selenium·flask·beautifulsoup·numpy·scikit-learn·pip·scipy
计算机编程小央姐8 天前
企业级大数据技术栈:基于Hadoop+Spark的全球经济指标分析与可视化系统实践
大数据·hadoop·hdfs·spark·echarts·numpy·课程设计
MoRanzhi12038 天前
12. NumPy 数据分析与图像处理入门
大数据·图像处理·人工智能·python·矩阵·数据分析·numpy
MoRanzhi12039 天前
9. NumPy 线性代数:矩阵运算与科学计算基础
人工智能·python·线性代数·算法·机器学习·矩阵·numpy
困鲲鲲10 天前
NumPy 系列(六):numpy 数组函数
python·numpy
半路_出家ren10 天前
python基础数据分析与可视化
python·数据分析·numpy·pandas·办公自动化·matplotlib·jupyternotebook
I'm a winner11 天前
第十四章:数据分析基础库NumPy(二)
数据挖掘·数据分析·numpy