[SciPy-dev] Segmentation fault in optimize
Manuel Metz
mmetz at astro.uni-bonn.de
Fri Feb 11 02:32:13 CST 2005
Hi,
I now know that I invoked the scipy.optimize.fmin_bfgs not correctly,
but I think a 'segmentation fault' even in this case is not a desired
result. :-(
#----fminerror.py----
import scipy
from Numeric import *
def f1(x):
return (x-5.3)**4
def fd1(x):
return 4*(x-5.3)**3
# This works fine
r1 = scipy.optimize.fmin_bfgs(f1,1)
print r1
# Here I get a segmentation fault
r2 = scipy.optimize.fmin_bfgs(f1,1,fd1)
print r2
#----fminerror.py----
-----------------------------------------------------
Output:
> python fminerror.py
Optimization terminated successfully.
Current function value: 0.000000
Iterations: 19
Function evaluations: 63
Gradient evaluations: 0
[ 5.31255046]
Segmentation fault
-----------------------------------------------------
I have a debian linux (sid), python2.3.5 and scipy 0.3.2 installed.
Manuel
--
-------------------------------------
Manuel Metz
Sternwarte der Universitaet Bonn
Auf dem Huegel 71 (room 3.06)
D - 53121 Bonn
E-Mail: mmetz at astro.uni-bonn.de
Phone: (+49) 228 / 73-3660
Fax: (+49) 228 / 73-3672
-------------------------------------
More information about the Scipy-dev
mailing list