AttributeError: 'int' object has no attribute 'array'
时间: 2023-09-09 09:11:58 浏览: 321
This error occurs when you try to access the attribute 'array' on an integer object. Integers do not have an 'array' attribute, so you need to make sure that you are using the correct data type and that the object you are trying to access the attribute from is actually an array.
For example, if you have an integer variable called 'x' and you try to access its 'array' attribute like this:
```
x.array
```
You will get the 'AttributeError: 'int' object has no attribute 'array'' error because integers do not have an 'array' attribute.
To fix this error, you need to check the data type of the object you are trying to access the attribute from and make sure that it actually has the attribute you are trying to access.
阅读全文