[已解决]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、解决方法[参考](https://blog.csdn.net/qq_51511878/article/details/129811061 "参考")

conda list

降低numpy 版本:

python 复制代码
pip uninstall numpy
pip install numpy==1.23.5
相关推荐
菜冻鱼12 小时前
Python-sklearn-特征工程
开发语言·人工智能·python·机器学习·numpy·matplotlib·sklearn
菜冻鱼4 天前
Python-pandas-索引与筛选
开发语言·笔记·python·numpy·pandas·学习方法
小趴蔡ha6 天前
03 NumPy 入门:机器学习中的数组和矩阵
python·线性代数·机器学习·numpy
乱七八糟的屋子7 天前
【C++数值计算】NumCpp超详细入门教程(纯正Numpy语法、零学习成本、C++首选科学计算库、性能压测对比)
c++·数值计算·numpy·高性能计算·科学计算·ndarray
Lee_jerome9 天前
python神经网络编程入门(二十)——RNN LSTM 数学原理与结构拆解
深度学习·numpy·lstm·参数量·sigmoid·tanh·门控机制
赤羽尾风9 天前
NumPy快速入门
python·numpy
Xiaok10189 天前
NumPy 数组 vs PyTorch Tensor
人工智能·pytorch·numpy
MIUMIUKK9 天前
数据分析(1/3)——Numpy数组基础学习笔记
numpy
Lee_jerome10 天前
python神经网络编程入门(十七)——RNN BPTT算法(上):梯度沿时间轴传播的链式法则
rnn·深度学习·神经网络·numpy·反向传播·梯度消失·bptt
编程阿峰11 天前
Python 环境配置(二)安装jupyter、matplotlib、numpy库
开发语言·python·jupyter·numpy·matplotlib