[已解决]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
相关推荐
坚持就完事了2 天前
Python之numpy
开发语言·python·numpy
鹿鸣悠悠4 天前
第二月:学习 NumPy、Pandas 和 Matplotlib 是数据分析和科学计算的基础
学习·numpy·pandas
数据媛6 天前
机器学习_13 决策树知识总结
人工智能·python·决策树·机器学习·numpy·pandas·sklearn
数据媛6 天前
机器学习_18 K均值聚类知识点总结
python·机器学习·均值算法·numpy·pandas·scikit-learn·聚类
old_power8 天前
图像缩放的双线性插值实现方式
图像处理·opencv·numpy
数行天下11 天前
详解tensorflow的tensor和Python list及Numpy矩阵的区别
python·tensorflow·numpy
qq_5155075011 天前
jupyter notebook中3种读图片的方法_与_图片翻转(上下翻转,左右翻转,上下左右翻转)
人工智能·python·jupyter·numpy
一个机器视觉工程师的自我修养11 天前
Halcon.Net与Numpy、OpenCV联合编程
人工智能·opencv·numpy
lihuayong14 天前
深度学习框架PyTorch
pytorch·深度学习·numpy·梯度下降·自动求导
好想写博客16 天前
[深度学习]神经网络-回归项目
pytorch·python·深度学习·神经网络·回归·numpy·pandas