I made a class in python like the following:
class myClass():
_fields_ = [1, 2]
where field_1 & field_2 are supposed to be integers.
Then I created an array that its elements are of the class myClass
as following:
array = [ myClass() for i in range(5)]
When I wanted to check the values of the elements of array
in the variable inspector, it gives my the following message:
"Spyder was unable to retrieve the value of this variable from the console."
"The error message was: Object array is not picklable"
My question is: How can I check the values of the elements of the array?
Check out the following Spyder related sites:
Verifyed,
pickle
can handleobject array
given in Question.The following works without failure.
Tested with Python:3.4.2
To verify your Spyder is able to show a
array
at all, check the following:Try to show the variable
array
with Inspector.If you are able to view the variable, it's a limitation from your Spyder Version to handle object array.