[已解决]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
相关推荐
絆人心1 天前
Python 数据分析核心库:Pandas 与 NumPy 从入门到实战全指南(附电商用户分析完整代码)
python·数据挖掘·数据分析·numpy·pandas·数据处理·电商数据分析
郝学胜-神的一滴1 天前
玩转PyTorch:detach函数破解自动微分张量转numpy难题
人工智能·pytorch·python·深度学习·机器学习·numpy
吃一根烤肠2 天前
NumPy 内置函数与数组运算完全指南
python·numpy
智算菩萨3 天前
【Python图像处理】4 NumPy数组操作与图像矩阵运算
图像处理·python·numpy
数据科学小丫3 天前
数据分析利器 Pandas :apply() 方法 + map() 配对 + 计算描述统计 + 协方差和相关性 + 异常值处理常用方法(基于 python )
python·数据分析·numpy·pandas
理想三旬3 天前
Numpy 数据库
python·机器学习·numpy
β添砖java4 天前
Numpy & Pandas (数据处理教程)(莫烦听课笔记)
numpy·pandas
绛橘色的日落(。・∀・)ノ5 天前
Numpy 第五章 数学函数
numpy
鱼骨不是鱼翅5 天前
Numpy
numpy
乖巧的妹子5 天前
numpy.nan Nan
numpy