[SciPy-User] Optimize.Leastsq Issues

Suraj Mirpuri mirpurisuraj1 at gmail.com
Fri Aug 9 08:53:02 EDT 2013


Well now I feel stupid. I don't even know what I did to correct that bug
but I just tested it and it works like a charm now.

I guess it really helps having another eye to look at your obvious
mistakes. Thanks so much for your time!

Regards,
Raj Mirpuri


On Fri, Aug 9, 2013 at 5:26 AM, Pauli Virtanen <pav at iki.fi> wrote:

> 09.08.2013 10:03, Suraj Mirpuri kirjoitti:> Hello All,
> [clip]
>  > I think I've been having some difficulty with optimize.leastsq the
>  > past  few hours because for the life of me I cannot seem to get it to
>  > work.
>
> The bug is in your own code: your resid() function always returns the
> same result:
>
>  >>> print(randomtest.resid(numpy.array([  60.,   180.,    22.,    22.,
>      0.2]), [randomtest.sorted_list]))
> [  1.9845187   32.64266682  26.29888414 -16.90617247  -5.73287752
>    -0.58050037   2.75023576]
>
>  >>> print(randomtest.resid(numpy.array([  6.,   18.,    2.,    2.,
> 0.]), [randomtest.sorted_list]))
> [  1.9845187   32.64266682  26.29888414 -16.90617247  -5.73287752
>    -0.58050037   2.75023576]
>
>
> _______________________________________________
> 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/20130809/cbecad2f/attachment.html>


More information about the SciPy-User mailing list