AttributeError: module 'numpy' has no attribute 'object'. `np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. 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
时间: 2024-04-09 20:32:06 浏览: 278
引用numpy出错详解及解决方法
这个错误消息表明在代码中使用了`np.object`,但是在最新版本的NumPy中已经将其废弃并删除了。为了解决这个问题,你可以将`np.object`替换为`object`。这样做不会改变任何行为,并且是安全的。你可以参考NumPy 1.20的发布说明页面,获取更多详细信息和指导:https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
阅读全文