[已解决]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
相关推荐
ljt27249606614 天前
Python笔记(十一)--Numpy(一)
笔记·python·numpy
小里lilili6 天前
金融数据分析技术栈拆解:从NumPy到机器学习,金融数学背景该如何补齐代码短板
金融·数据分析·numpy
gCode Teacher 格码致知7 天前
Pandas教学25:NumPy 的实战价值集中的四件事
numpy·pandas
gCode Teacher 格码致知7 天前
Pandas教学24:NumPy、Pandas、Matplotlib三者之间的关系
numpy·pandas·matplotlib
BK贝壳9 天前
亿级用户签到位图选型复盘:用 bool-hybrid-array 扛冷启动打卡,也把它和 Roaring/Redis 的边界测清楚了
数据结构·python·性能优化·numpy
Patrick在香港9 天前
一个加 1 的动作,把最大值变成了最小值
python·numpy·数据类型·整数溢出·数据精度
万粉变现经纪人9 天前
如何解决 pip install 安装报错 检测到 yanked 版本需更换可用版本 问题
人工智能·python·scrapy·numpy·pandas·pyqt·pip
BK贝壳10 天前
bool-hybrid-array 落盘我只认 .bha:用 Create_BHA / Ask_BHA 做布尔数组序列化
数据结构·python·numpy·1024程序员节
郝学胜-神的一滴14 天前
AI 编程智能体 09:零门槛调用教程
人工智能·数据分析·自动化·numpy·pandas·量化投资
kaixin_啊啊15 天前
【零基础学AI】第 13 章——NumPy 和向量
人工智能·numpy