[SciPy-User] curve_fit for f(x,y)?

josef.pktd@gmai... josef.pktd@gmai...
Wed Nov 24 10:57:18 CST 2010

On Wed, Nov 24, 2010 at 11:46 AM, elmar <elmar@net4werling.de> wrote:
> Hi,
> is there a function in scipy similar to curve_fit for f(x,y) ? See
> attachement.

if you collect the x variables in a tuple (or put then in an array)
then curvefit works without raising an exception

def calc_WA((T, t), WA_0, k_0, E)

popt, pcov = curve_fit(calc_WA, (T_K, t_sec), WA) # get optimized parameters
WA_predicted = calc_WA((T_K, t_sec), *popt)

but predicted are zero, so maybe without good starting values it
doesn't find a solution.

I didn't try to read carefully, just tried out the tuple, and don't
know if it makes sense.


> Any help is wellcome
> Cheers
> Elmar
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

More information about the SciPy-User mailing list