[已解决]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
相关推荐
chde2Wang5 小时前
numpy学习3
学习·numpy
MoRanzhi12036 小时前
第 9 篇 · 数值计算与图像处理:NumPy、SciPy、Pillow
图像处理·python·数值计算·numpy·pillow·信号处理·scipy
chde2Wang10 小时前
numpy学习2
学习·numpy
databook1 天前
从循环到向量化:NumPy提速的7个关键思维
python·数据分析·numpy
53488736abcdefg3 天前
Anaconda+Jupyter+NumPy
jupyter·numpy·anaconda
chde2Wang4 天前
numpy学习
numpy·大数据比赛
TechEdu2026064 天前
[人工智能]Python11:NumPy 源代码、软件架构与软件流程
人工智能·numpy
databook6 天前
什么是范数?用 NumPy 动手算一遍就明白了
python·数学·numpy
Yyyyyy~6 天前
【机器学习】Numpy
人工智能·机器学习·numpy
郝学胜-神的一滴7 天前
Numpy数据处理详解 01:NumPy 从环境搭建到入门上手
开发语言·人工智能·python·程序人生·数据分析·numpy