[已解决]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
相关推荐
m沐沐14 天前
【计算机视觉】OpenCV 模板匹配银行卡数字识别---下
人工智能·python·opencv·计算机视觉·pycharm·numpy
云和数据.ChenGuang16 天前
大模型厂商常用的数据库有哪些?
数据库·人工智能·pytorch·深度学习·numpy
MATLAB代码顾问17 天前
Python NumPy数值计算核心指南
开发语言·python·numpy
FBI HackerHarry浩17 天前
解决pip 安装 numpy 时元数据生成失败
numpy·pip
m沐沐19 天前
【计算机视觉】OpenCV 模板匹配银行卡数字识别---上
人工智能·后端·python·opencv·计算机视觉·pycharm·numpy
iRayCheung21 天前
virtualbox安装的ubuntu系统跑numpy报错
linux·ubuntu·numpy
SilentSamsara22 天前
scikit-learn 工作流工程化:Pipeline、ColumnTransformer 与自定义转换器
开发语言·人工智能·python·机器学习·青少年编程·numpy·scikit-learn
SilentSamsara23 天前
NumPy 进阶:广播机制、ufunc 与向量化计算的工程实践
开发语言·python·青少年编程·性能优化·numpy
DogDaoDao23 天前
【第 04 篇】列表与元组 —— 序列类型核心详解
人工智能·python·深度学习·神经网络·机器学习·conda·numpy
zyl8372124 天前
Python NumPy 学习
python·学习·numpy