Hi Maurizio,

On Fri, 20 Feb 2009 16:21:36 -0800 (PST)
Maurizio <maurizio.gran...@gmail.com> wrote:

> unfortunately, I don't have the code with me right now (I could give
> you on monday), but I'm pretty sure it is something REALLY
> straightforward and not optimized, like this:
> 
> def coll(expr,s):
>     import sympy as sp
>     spexpr = sp.sympify(expand(expr))
>     temp = sp.collect(spexpr,s)
>     return temp._sage_()
> 
> var('a b c s')
> prova = a*s + (b+s)*c
> 
> coll(prova,s)
>               (c + a)*s + b*c

Note that Pynac based symbolics already provides this functionality.

sage: var('a b c s',ns=1)
(a, b, c, s)
sage: prova = a*s + (b+s)*c
sage: prova.collect(s)
(a + c)*s + b*c

I hope to start the switch to use pynac as the default backend for
symbolics soon, but I'm still reluctant to give a time frame.

As to your original remark:
> I am wondering what do you think about simplifying the access and use
> of the external packages to accomplish some very simple operations. I
> first say that I do intensive use of plot and symbolic analysis
> (calculus) routines.

Please point out other functionality that you think should be exposed
through a better interface. I agree that we should do a better job in
this area.

Cheers,

Burcin

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to