Jul-18-2017, 02:25 PM
This call here is the problem:
You want to call it as a bound parameter:
meanx = Correlation.Mean1(self.a)By referencing the class (Correlation) rather than the instance (self), you are calling an unbound method. But the Mean1 method is written as a bound method, which you would normally call by referencing self. You are then providing a parameter to the call. Since you have called it unbound, it is not providing the automatic self parameter, the parameter you provide (self.a) becomes the self parameter within the method call. Since self.a is a list, you getting the error you saw.
You want to call it as a bound parameter:
meanx = self.Mean1()That will provide the automatic parameter self (equal to the instance) to the method, and self.a will resolve correctly. You would need to adjust your other calls using Correlation similarly.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures