[已解决]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
相关推荐
坚持就完事了15 小时前
大二下期末
python·numpy·pandas
元直数字电路验证2 天前
Python数据分析及可视化中常用的6个库及函数(一)
python·numpy
猫头虎3 天前
零基础安装 Python 教程:从下载到环境配置一步到位(支持 VSCode 和 PyCharm)与常用操作系统操作指南
vscode·python·pycharm·beautifulsoup·numpy·pyqt·pip
心动啊1213 天前
Numpy——结构化数组和Numpy文件
numpy
love530love5 天前
【笔记】为 Python 项目安装图像处理与科学计算依赖(MINGW64 环境)
开发语言·图像处理·人工智能·windows·笔记·python·numpy
love530love5 天前
【笔记】Windows系统部署suna基于 MSYS2的Poetry 虚拟环境backedn后端包编译失败处理
开发语言·人工智能·windows·笔记·python·numpy
船长@Quant6 天前
CQF预备知识:Python相关库 -- NumPy 基础知识 - 线性代数 numpy.linalg
python·numpy·cqf
zzc9219 天前
python h5py 读取mat文件的<HDF5 object reference> 问题
开发语言·python·numpy
ayas1231911 天前
numpy与matplotlib学习——数据可视化入门
学习·numpy·matplotlib
hutaotaotao14 天前
python中的numpy(数组)
python·numpy