On Fri, Feb 15, 2013 at 3:35 AM, Johan Hake <[email protected]> wrote: > Hello! > > First thanks for a wonderful toolkit! > > Second stupid questions and it might have been answered previously. Is it > possible to not perform a scalar multiplication a la: > > from sympy import * > s = Symbol("s") > expr=(2.+s)*5 > > without simplifying the expr to 5*s + 10.0? > > I use sympy to generate code and I would like the original expression > instead of the simplified. > > Is this at all possible? >
You can use Mul(5, 2+s, evaluate=False). -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
