[已解决]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
相关推荐
Xiu Yan1 天前
Python 数据分析:Pandas DataFrame 零基础入门教程
python·jupyter·pycharm·numpy·pandas
醇氧1 天前
Git 合并冲突与`__pycache__` 的恩怨情仇
python·numpy·fastapi
Xiu Yan2 天前
Python 数据分析:Pandas Series 零基础入门教程
python·jupyter·pycharm·numpy·pandas
lpfasd1234 天前
配置文件格式对比 与 AI Coding 的选择逻辑
python·flask·numpy
jzshmyt5 天前
我用 Python 从零“生成“了一个宇宙,然后让它观察自己(v14)
人工智能·pytorch·python·numpy·matplotlib·空间计算·scipy
搞AI的金鱼5 天前
Numpy
numpy
典典分享指南6 天前
用飞书 Wiki 搭内容作战室:从零搭建团队内容协作中枢
django·flask·numpy·pyqt
梦帮科技7 天前
从提示词到可复现音乐工作流:RNOISE 2.0 的 Prompt Engineering 架构
人工智能·python·mysql·ci/cd·架构·node.js·numpy
飞Link7 天前
【Numpy】 第三部分:矩阵运算与线性代数(计算篇)
python·numpy
kyrie_sakura8 天前
python学习笔记15 -- Anaconda,Jupyter,numpy
python·学习·jupyter·numpy