0

I trying to use the fsolve function from scipy.optimize library to solve a non-linear equation changing the parameteres of the equation, but when I run the code, I receive the following error message:

TypeError: Improper input parameters were entered.

I reviewed the program multiple times and I still can't find the problem. I've searched through the internet and I didn't find any documentation or people with the same problem. I wrote this code for the function:

def Rolling(h,ho,b,mi,R,sig,load):
  Dh  = ho - h
  hm  = (h+ho)*0.5
  Lp  = (R*Dh)**0.5
  Q   = mi*Lp/hm
  P   = sig*(b/Q*(exp(Q)-1)*Lp)

  return P-load

I wrote a loop where the values of the equation changes, but I always what to find the value of 'h' for every situation, so I use fsolve:

h = fsolve(lambda H: Rolling(H,ho,b,mi,R,sig,load),hi)

The problem occurs in this line.

P.S.: I already tried using args=(), but returns the same message.

0 Answers0