[已解决]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
相关推荐
XX風8 小时前
三维点云处理环境相关-ubuntu安装numpy、open3d
linux·ubuntu·numpy
方安乐17 小时前
python之向量、向量和、向量点积
开发语言·python·numpy
隔壁大炮1 天前
Day07-RNN介绍
人工智能·pytorch·rnn·深度学习·神经网络·算法·numpy
隔壁大炮2 天前
Day06-08.CNN概述介绍
人工智能·pytorch·深度学习·算法·计算机视觉·cnn·numpy
光之后裔2 天前
Numpy以及Pytorch中多维数组的维度数与维度值以及轴axis理解
pytorch·python·numpy
隔壁大炮3 天前
Day02-13.张量的拼接操作
人工智能·pytorch·深度学习·神经网络·numpy
爱喝热水的呀哈喽4 天前
5步创建一个有不同numpy scipy版本的python环境
python·numpy·scipy
陶陶然Yay5 天前
神经网络常见层Numpy封装参考(5):其他层
人工智能·神经网络·numpy
2501_921960855 天前
协同本体论:元公理体系、普适演化律则与工程范式统一构建
python·重构·numpy·pandas·scipy
陶陶然Yay5 天前
神经网络常见层Numpy封装参考(6):卷积层
人工智能·神经网络·numpy