def myFunction_2(p,skewness,kurtosis): x=p[0] y=p[1] z=p[2] f=empty((3)) f[0]=pow(x,2)+pow(y,2)+6*x*y+15*pow(z,2)-1 f[1]=8*pow(y,3)+ 6 * pow(x,2) * y + 72 * x * y * z + 270 * y * pow(z,2) - skewness f[2]=3 * x**4 + 60 * x**2 * y**2 + 60 * y**4 + 60 * x**3 * z +936 * x * y**2 *z + 630 * x**2 * z**2 + 4500 * y**2 * z**2 + 3780 * x * z**3 + 10395 * z**4-3-kurtosis return f zGuess=array([2,2,2]) z=fsolve(myFunction_2,zGuess)I am trying to define a function wherein skewness and kurtosis arguments can vary and I want thus the solution to the non linear equations. However, I get an error message that reads "myFunction_2() takes exactly 3 arguments (1 given)". I have specified these arguements in the equations f[1] and f[2], to be able to call the function later with varying values of kurtosis and skewness- What am I doing wrong?
Defining an fsolve function to call later
Users browsing this thread: 1 Guest(s)