Hi,

I am writing a script in which I generate the an expression. This expression I want to use 1) with preview and 2) with lambdify.


Lets say

expr = phidd**2

And I want preview to use the latex code '\ddot{\varphi}' for rendering of phidd. Therfore I defined:

phidd = sp.Symbol(r'\ddot{\varphi}').


However, this causes problems when I call

sp.lambdify(phidd, expr)


File "<string>", line 1
     lambda \ddot{\varphi}: (\ddot{\varphi}**2)
                                              ^
SyntaxError: unexpected character after line continuation character

A manual workarround would be to substitute the critical symbol with some uncritical one.

However Im wondering if there is another (cleaner) way.

I would like to use the code in a tutorial session, therefore I would like minimize the ballast.


Best regards,
Carsten

--
You received this message because you are subscribed to the Google Groups 
"sympy" group.
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/sympy?hl=en.

Reply via email to