Thanks a lot ! It works now.
On 4 nov, 13:18, Marshall Hampton <hampto...@gmail.com> wrote:
> I changed your Kohl function to:
>
> def Kohl(t,b):
> return n(exp(-(exp(t*ln(10.0))/T_sol)**b))
>
> and things worked on sagenb. I don't completely understand what's
> going on though, seems like a bug in find_fit in converting things to
> numpy types. While it shouldn't have to be this way, I have found it
> is often safer and faster to avoid exact data types when doing
> numerical work. For example, I usually use "npi = RDF(pi)" and then
> avoid the use of the symbolic pi. Many related problems have gone
> away as we've switched to pynac for basic symbolics, though, so to
> some extent that is legacy habit on my part.
>
> -Marshall Hampton
>
> On Nov 4, 5:30 am, "cchristy...@gmail.com" <cchristy...@gmail.com>
> wrote:
>
> > That's strange, the page published #924 isn't mine any more.. Here is
> > mine :http://www.sagenb.org/home/pub/931/
>
> > If it disappears again, the problem comes from this line :
>
> > B_sol=find_fit(f1_data, Kohl, parameters = [Beta], variables = [t],
> > initial_guess = [0.3], solution_dict = True)[Beta]
>
> > where Kohl is a python function :
>
> > var("Beta")
> > def Kohl(t,Beta):
> > return n(exp(-(exp(t*ln(10))/T_sol)**Beta))
>
> > f1_data a set of points :
>
> > [
> > [-15.0000000000000, 0.94311622895386082],
> > [-14.8800000000000, 0.94311556569591271],
> > [-14.7600000000000, 0.94311469137075055],
> > [-14.6400000000000, 0.94311353881889759],
> > [-14.5200000000000, 0.94311201951731505],
> > ........
>
> > and T_sol = 3.7139753336269206e-08
>
> > Thanks
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---