[SciPy-User] How to fix a parameter when using curve_fit ?
Spark Liang
sparkliang at gmail.com
Fri Jun 10 13:16:36 EDT 2011
thanks, Josef.
I have done it by using mpfit, though it's not very easy.
On Fri, Jun 10, 2011 at 8:35 PM, <josef.pktd at gmail.com> wrote:
> On Fri, Jun 10, 2011 at 8:01 AM, Spark Liang <sparkliang at gmail.com> wrote:
> > Hi, would someone be so kind to tell me how to fix some parameters when
> > using curve_fit ?
> > I googled it and found that I may use scipy.odr or mpfit, but they seem
> > rather complicated.
> > I also searched the maillist, someone said it can be done by by writing a
> > nested function or a class. but how to do it?
>
> a full version is at http://docs.python.org/library/functools.html in
> the example for functools.partial
>
> I usually prefer to use a class, where you set the fixed parameters in
> the __init__ and access it with self.a(ttributename) inside the
> function.
>
> Josef
>
> >
> > _______________________________________________
> > SciPy-User mailing list
> > SciPy-User at scipy.org
> > http://mail.scipy.org/mailman/listinfo/scipy-user
> >
> >
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20110611/e01e3011/attachment.html>
More information about the SciPy-User
mailing list