[已解决]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
相关推荐
咚咚王者19 小时前
人工智能之数据分析 numpy:第十五章 项目实践
人工智能·数据分析·numpy
咚咚王者3 天前
人工智能之数据分析 numpy:第十章 副本视图
人工智能·数据分析·numpy
咚咚王者3 天前
人工智能之数据分析 numpy:第十一章 字符串与字节交换
人工智能·数据分析·numpy
AI小云5 天前
【数据操作与可视化】Pandas数据处理-Series数据结构
开发语言·数据结构·python·numpy·pandas
咚咚王者5 天前
人工智能之数据分析 numpy:第八章 数组广播
人工智能·数据分析·numpy
咚咚王者6 天前
人工智能之数据分析 numpy:第七章 数组迭代排序筛选
人工智能·数据分析·numpy
weixin_468466856 天前
模拟退火算法求解聚类问题python代码示例
python·numpy·聚类·模拟退火算法·fcm·智能优化·模糊聚类
咚咚王者6 天前
人工智能之数据分析 numpy:第三章 Ndarray 对象和数组创建
人工智能·数据分析·numpy
醒过来摸鱼7 天前
9.12 sinc插值
python·线性代数·算法·numpy