[已解决]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、解决方法[参考]

conda list

降低numpy 版本:

python 复制代码
pip uninstall numpy
pip install numpy==1.23.5
相关推荐
癫狂的兔子4 小时前
【Python】【NumPy】学习笔记
python·学习·numpy
MarkHD7 小时前
智能体在车联网中的应用:第12天 Python科学计算双雄:掌握NumPy与Pandas,筑牢AI与自动驾驶数据基石
人工智能·python·numpy
Lucky高2 天前
NumPy库实践5_输入和输出
numpy
木童6622 天前
Ansible
numpy
paopao_wu2 天前
深度学习1:Python基础库NumPy与Matplotlib
python·深度学习·numpy
习习.y4 天前
KNN算法学习笔记
numpy
祁思妙想4 天前
数据分析三剑客:NumPy、Pandas、Matplotlib
数据分析·numpy·pandas
猪在黑魔纹里5 天前
解决VSCode无法高亮、解析numpy中的部分接口(如pi、deg2rad)
ide·vscode·python·numpy
九死九歌5 天前
【Sympydantic】使用sympydantic,利用pydantic告别numpy与pytorch编程中,tensor形状带来的烦人痛点!
开发语言·pytorch·python·机器学习·numpy·pydantic
qq19226386 天前
探索图像滤波去噪:MATLAB GUI的奇妙之旅
numpy