[SciPy-User] ODR fitting several equations to the same parameters

Travis Oliphant oliphant@enthought....
Fri Nov 13 10:56:21 CST 2009


On Nov 13, 2009, at 9:28 AM, ms wrote:

> josef.pktd@gmail.com ha scritto:
>> On Thu, Nov 12, 2009 at 10:04 AM, ms <devicerandom@gmail.com> wrote:
>>> josef.pktd@gmail.com ha scritto:
>> an example
>> (quickly written and not optimized, there are parts I don't remember
>> about curve_fit, fixed parameters could be better handled by a class)
>
> Hmm, it seems I don't have curve_fit -I am constrained to use
> scipy-0.6.0 and there's no chance to change that (it's an external  
> server).
>

The code for curve_fit is pure python.    You can grab it from the  
scipy trunk and just insert it into your own code.

http://projects.scipy.org/scipy/browser/trunk/scipy/optimize/minpack.py


Get lines 338 through 430

and make sure the module you put them in also has the lines:

from scipy.optimize import leastsq
from numpy import isscalar, asarray


-Travis



More information about the SciPy-User mailing list