AttributeError: 'dict' object has no attribute 'shape'
时间: 2023-10-21 10:04:24 浏览: 581
解决运行出现dict object has no attribute has_key问题
5星 · 资源好评率100%
This error occurs when you try to access the attribute "shape" on a dictionary object in Python. The "shape" attribute is specific to arrays and matrices, and is not applicable to dictionaries.
To fix this error, you need to check if the object you are trying to access the "shape" attribute on is actually an array or matrix. If it is a dictionary, you should use the appropriate dictionary methods to access its keys and values.
阅读全文