'numpy.ndarray' object has no attribute 'argwhere'
时间: 2023-10-14 12:05:17 浏览: 139
这错误通常是因为 NumPy 版本太低导致的,argwhere() 函数是从 NumPy 1.13.0 版本开始引入的。请尝试更新 NumPy 到最新版本,如果你已经安装了最新版本的 NumPy,那么请检查你的代码,确保你正在使用正确的数据类型调用 argwhere() 函数。如果问题仍然存在,请提供更多上下文信息,以便我更好地帮助你解决问题。
相关问题
numpy.ndarray' object has no attribute
It depends on the specific attribute that is being referred to.
If the error message says "'numpy.ndarray' object has no attribute X", it means that the ndarray object does not have an attribute named X. This could be due to a typo in the attribute name or because the attribute does not exist in the ndarray class.
Some common attributes of the ndarray class include shape, size, dtype, ndim, and data. If any of these attributes are misspelled or used incorrectly, a similar error message may appear.
To avoid this error, it is important to carefully check the spelling and syntax of all attribute names and ensure that they are appropriate for the specific class being used.
numpy.ndarray object has no attribute values
这是一个 Python 的错误信息,表示 numpy 的 ndarray 类型对象没有 values 属性。可能是因为你想使用 Pandas 的 DataFrame 中的 values 属性来获取 ndarray 类型的数据,但是误用在了一个不支持 values 属性的类型上。建议仔细检查代码,查找并解决对该属性的误用。
阅读全文