I've been trying to get a fix and can't find why the error keeps appearing. Pmin, Pmax,w,fi1 and fi2 have all been assigned finite values
guess=Pmin+(Pmax-Pmin)*((1-w**2)*fi1+(w**2)*fi2)
When I remove this line from the code, the same error appears at the next line of code, again for no reason I can think of