*Please forget the last part of the previous note. I was handling a very 
old version of find_fit. I have taken a new one and will try to make the 
changes to increase functionality on it.*

El viernes, 30 de enero de 2015, 13:13:18 (UTC+1), rafaellope...@gmail.com 
escribió:
>
> I've tried to follow Volker's suggestion and prepare a python object for 
> this purpose. However, I found a problem that I cannot manage. I must warn 
> that my programming skills in python are rather limited (to say the less) 
> and, therefore, I wouldn't be surprised if it were a silly issue. 
>
> The fact is that substitute (subs) function of my code works fine in SAGE 
> but it doesn't in pure python because of object type when using 'sum' (line 
> 52 of my code). It works if I use replace function instead. However, in 
> this case it is SAGE which complains about. (I had to make further changes 
> in code for pure python but they seem to work).
>
> In summary, now I have two codes: one for SAGE in SAGE-style (I took the 
> idea of returning results in a dictionary from other SAGE functions, like 
> "solve" or "find_fit", which work this way), and another in pure python 
> style.
>
> Nevertheless, I think that a different strategy could be much better. 
> Instead of preparing a different new function, it can be better to modify 
> SAGE's "find_fit" to include new functionality. I've had a look on 
> "find_fit" code and it seems not very difficult. However  I have tried to 
> directly load "find_fit" code (changing its name) in a notebook and found 
> that the following line  causes an error:
>
> from sage.calculus.calculus import SymbolicExpression, 
> CallableSymbolicExpression
>
> from sage.calculus.calculus import SymbolicExpression, 
> CallableSymbolicExpression
> ImportError: cannot import name SymbolicExpression
>
> Any hint?
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to