[已解决]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
相关推荐
清水白石00810 天前
NumPy 向量化实战指南:从原理到实践的性能革命
python·numpy
Web极客码11 天前
CentOS 7 删除文件却不释放空间?从 inode、文件描述符到 VFS 的底层原理解析
python·centos·numpy
sheyuDemo12 天前
关于深度学习的d2l库的安装
人工智能·python·深度学习·机器学习·numpy
deepxuan14 天前
Day2--python三大库-numpy
开发语言·python·numpy
Flying pigs~~14 天前
数据分析三剑客之Pandas
大数据·数据库·人工智能·数据分析·numpy·pandas
Quintus五等升14 天前
深度学习自用笔记
人工智能·笔记·深度学习·学习·机器学习·bert·numpy
咚咚王者16 天前
人工智能之视觉领域 计算机视觉 第三章 NumPy 与图像矩阵
人工智能·计算机视觉·numpy
星川皆无恙16 天前
豆瓣电影数据爬虫分析:基于 Python 的豆瓣电影数据可视化分析系统
大数据·爬虫·python·算法·机器学习·信息可视化·numpy
星辰徐哥17 天前
人工智能从入门到精通:NumPy 与 Pandas 数据分析基础
人工智能·ai·数据分析·numpy·pandas
玄同76517 天前
NumPy 与 Pandas 中「有无返回值函数」的易错点整理
人工智能·python·机器学习·数据挖掘·数据分析·numpy·pandas