Installed a pyenv
for symbolic math, worked for the first time with sympy
.
Making the pyenv
In thesis/compute_derivs
:
pyenv install 2.7
pyenv virtualenv symmath
pyenv local symmath
Get the sympy package at commit 253595b4d
git clone git://github.com/sympy/sympy.git
I followed parts of Sympy’s tutorial. Main takeaway:
from sympy import *
init_printing(use_unicode=True) # Pretty printing the output
v1, v2, v3 = symbols('v1 v2 v3', real=True) # Making symbols of real values
v = Matrix([[v1],[v2],[v3]]) # Tada, it's a vector now
diff(v.norm(), v) # Compute the deriv of the norm
Questions:
- is there a LaTeX output mode?
- are there quaternions in Sympy already?