[SciPy-user] how can I get fsolve() work?!

Ri Hai hai@lpt.rwth-aachen...
Fri Mar 30 09:05:38 CDT 2007


Hell folks,

 

When I use fsolve, python crashes! Now I am testing fsolve with the code
from the mailing list:
 
#-----------
from scipy.optimize import fsolve
 
 
def func2(x):
        out = [x[0]+2.*x[1]+2.*x[2]-1.]
        out.append(x[0]+x[2] - 2.*x[1])
        out.append(x[3]+x[4]-1.)
        out.append(1./5-2./5*x[2]+2./5*x[0]*x[3]-x[0])
        out.append(1./5-x[1]/5.-x[2]/5.+2/5.*x[1]*x[4]+x[1]/5.-x[1])
        #out.append(1/5-2/5*x[1]+2*x[2]/5+x[2]*x[3]/5)
        return out
 
x02 = fsolve(func2, [0.25,0.25,0.5,0.5,0.5])
 
#----------------
 
The code is taken form the mail from john in July 2006 and he said it
did work. However my python crashed again! I really don't know how to
solve this problem.  
 
I use python 2.5, scipy 0.5.2, numpy 1.01 and windows XP.
 
Has someone the same problem? Can somebody help me? Please...
 
Hai 
    
 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20070330/bc3cb6e6/attachment.html 


More information about the SciPy-user mailing list