Check lambdify. I have much to say *against* the way it is written and how it acts on corner cases, but for simple stuff it works well.
It just prints the expressions to a string and uses eval() on that string. It can "compile" to python.math, numpy and mpmath. On 7 May 2012 15:14, Alan Bromborsky <abro...@verizon.net> wrote: > What is the simplest way of converting a sympy expression (formula) to a > standard python expression for the purpose of evaluation using tools such as > numpy. That is convert all the sympy variables and functions to python > variables and functions similar to fcode and ccode, but for python and doing > it within the program as opposed to writing to a file (printing). > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To post to this group, send email to sympy@googlegroups.com. > To unsubscribe from this group, send email to > sympy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. > -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.