[已解决]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
相关推荐
泡干脆面就番茄6 天前
NumPy 科学计算完全指南:从数组创建到广播机制
python·numpy
战略性的菠萝9 天前
学习笔记-Numpy知识
python·numpy
典典分享指南10 天前
GEO 实战:从挖搜索词到监控 AI 收录,一套内容流水线怎么搭
开发语言·青少年编程·numpy·erlang
智购科技自动售卖机厂家11 天前
2026自动售货机OTA升级系统设计:从全量升级到差分升级的带宽优化工程实践~YH
大数据·人工智能·numpy·pyqt·fastapi
️学习的小王11 天前
NumPy完整学习笔记:ndarray数组详解、创建、索引切片、常用函数与运算
笔记·学习·numpy
BK贝壳12 天前
Python底层:1亿个布尔值缓存失效标记,list爆内存numpy爆拷贝,bool-hybrid-array混合存储实测
数据结构·python·缓存·性能优化·list·numpy
爱吃火鸡面呀12 天前
NumPy 从入门到精通:一份完整的高质量学习路线与实践指南
学习·numpy
三十岁老牛再出发13 天前
08.18每日总结
c++·python·numpy·pandas
菜冻鱼20 天前
Python-sklearn-SVM
开发语言·人工智能·python·机器学习·支持向量机·numpy·sklearn
菜冻鱼21 天前
Python-sklearn-评估指标
开发语言·人工智能·python·机器学习·numpy·pandas·sklearn