[已解决]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
相关推荐
百年੭ ᐕ)੭*⁾⁾16 小时前
DataFrame存入mysql以及读取操作
数据库·mysql·numpy·pandas·ipython
TheLegendMe3 天前
NumPy 矩阵操作 + 图像处理
图像处理·矩阵·numpy
李昊哲小课3 天前
NumPy轴方向统计在多维数据分析中的应用
python·数据分析·numpy
李昊哲小课4 天前
NumPy 完整学习笔记
笔记·python·学习·数据分析·numpy
好家伙VCC4 天前
**NumPy中的高效数值计算:从基础到进阶的实战指南**在现代数据科学与机器学习领域
java·python·机器学习·numpy
MediaTea4 天前
NumPy:ndarray 数组属性
numpy
Jia-Hui Su4 天前
Python类型标准(Type Hints)详解
开发语言·python·numpy·pyqt·ipython·python3.11
@fai5 天前
【Python多线程截图】当 Python 多线程遇上底层 C 库——一次由“串图”引发的线程安全深度思考
python·opencv·numpy
懒羊羊不懒@5 天前
NumPy库详细介绍
numpy
love530love8 天前
ComfyUI 报错解决记录:NumPy/SciPy 不兼容与 OpenCV 扩展模块缺失
人工智能·windows·python·opencv·numpy·scipy·layerstyle