I wrote a script in python that uses sympy to calculate a pair of vector / matrix formulas. However, when I try to convert them to functions that I can evaluate with sympy.lambdify, I get
SyntaxError: EOL while scanning a string literal
Here is the code with the same error so you can see what I mean.
import sympy x = sympy.MatrixSymbol('x',3,1) f = sympy.lambdify(x, xT*x)
Thus, the syntax error is related to the expression "x'.dot (x)" and the conversion of ".T" to '.
How can I get around this in order to correctly determine f from the above lambdify?
python vector sympy
Konstantinos
source share