[已解决]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
相关推荐
广州景颐光电2 天前
3种NumPy向量化实测:光源数据处理从2.3秒压到12.3ms
numpy
梅雅达编程笔记3 天前
零基础学 Python 第14章 | 模块、包与第三方库
开发语言·python·django·numpy·pandas
梅雅达编程笔记3 天前
零基础学 Python 第15章 | 类与对象:面向对象编程入门
开发语言·python·django·numpy·pandas
pulinzt3 天前
Tableau的基础使用
数据库·numpy
梅雅达编程笔记4 天前
编程启蒙|Scratch 转 Python 系列第9天:字典/哈希表积木双向对照(AI大模型参数配置表实战)
开发语言·人工智能·python·numpy·pandas
汤姆小白6 天前
08-应用部署
人工智能·python·机器学习·numpy·transformer
汤姆小白8 天前
02-Tokenizer原理与实现
人工智能·python·机器学习·numpy
汤姆小白8 天前
01-环境搭建与项目导览
人工智能·python·机器学习·numpy
CS创新实验室9 天前
NumPy数组的C风格和Fortran风格
c语言·开发语言·numpy
梅雅达编程笔记9 天前
零基础学 Python 第7章 | 字典 dict:键值对存储
开发语言·python·beautifulsoup·numpy·pandas