[已解决]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
相关推荐
overFitBrain1 天前
机器学习基础-numpy
人工智能·机器学习·numpy
一百天成为python专家3 天前
数据可视化
开发语言·人工智能·python·机器学习·信息可视化·numpy
赴3353 天前
Numpy 库 矩阵数学运算,点积,文件读取和保存等
人工智能·算法·numpy·random·dot
海哥编程4 天前
Python 数据分析(一):NumPy 基础知识
python·数据分析·numpy
赴3356 天前
numpy库 降维,矩阵创建与元素的选取,修改
numpy·flatten
paid槮6 天前
Python进阶第三方库之Numpy
开发语言·python·numpy
星期天要睡觉7 天前
NumPy库使用教学,简单详细。
numpy
lxmyzzs7 天前
【bug】Yolo11在使用tensorrt推理numpy报错
yolo·计算机视觉·bug·numpy
WBluuue7 天前
数学建模:运筹优化类问题
python·算法·数学建模·numpy·动态规划·matplotlib·图论
@MMiL8 天前
Python 中常见的数据管理高效方法
python·numpy·pandas·matplotlib