![](https://secure.gravatar.com/avatar/5a2b30a58d0290e52f19c180ec190c31.jpg?s=120&d=mm&r=g)
OS: Ubuntu Dapper Drake Python info: Python 2.4, Scipy 0.3.2, Numpy 1.0b5 Output================================================= /usr/lib/python2.4/site-packages/scipy_base/ppimport.py:273: UserWarning: The pstats module is not available. Install the python2.4-profiler Debian package if you need it module = __import__(name,None,None,['*']) -2.0 -2.0 Segmentation fault ======================================================== ----- Original Message ----- From: "Travis Oliphant" <oliphant.travis@ieee.org> To: "SciPy Users List" <scipy-user@scipy.org> Sent: Thursday, September 28, 2006 11:05 AM Subject: Re: [SciPy-user] python crash in leastsq
djf@pdx.edu wrote:
I receive a segmentation fault from the following code:
from scipy.optimize import * from scipy import * # Fit Mean of A*x to Mean of B---------- #-------------------------------------- def fit(x): d=mean(x*A)-mean(B) return d #-------------------------------------- A=[1,2] B=[3,4] x0=[1] (x,msg)=leastsq(fit,x0) print x
Any advice?
Please give a more detailed report. What versions of scipy and numpy are you using? And if you can provide a trace-back that is even better.
-Travis
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user