On 10/6/11 4:53 PM, Marcin Kostur wrote:
Hi,

Possibility of nice integration of fast compiled code is an excellent
feature of sage.
Suppose that I have a workflow:

1) derive some formulas with symbolics, arriving at expression of
type  sage.symbolic.expression.Expression

2) evaluate the resulting expression many times: e.g. plotting,
integrating, solving ode with rhs equal to the expression.

The step "2" can  be coded with cython, i.e. I want to use own
algorithm for "2". But the question remains -  how to get
sage.symbolic.expression.Expression into a cython code? Is there any
way to do so? My solution is to "retype" the expression into cython
cell ;-(


I was going to say that fast_callable was your friend, but this shows that sometimes, fast_callable isn't smart enough (apparently it doesn't know about the libc log, for example):

http://test.sagenb.org/home/pub/10/

However, it might be sufficient for you, and it gets pretty close to hand-coded Cython.

This also seems relevant:

http://www.sagenb.org/home/pub/3126/

Thanks,

Jason

--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to