[SciPy-user] python crash in leastsq

Daniel Fish djf at pdx.edu
Thu Sep 28 13:17:01 CDT 2006


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 at ieee.org>
To: "SciPy Users List" <scipy-user at scipy.org>
Sent: Thursday, September 28, 2006 11:05 AM
Subject: Re: [SciPy-user] python crash in leastsq


> djf at 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 at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
> 



More information about the SciPy-user mailing list