An occasionally updated blog, mostly related to programming. (Views are my own, not my employer's.)
Saturday, February 11, 2023
Impressed with sympy
I know this doesn't even come close to scratching the surface of what's possible with it, but I was impressed with this little interaction with sympy already:
import sympy
from sympy import Rational
a = sympy.symbols('a')
e = Rational(13, 4) * (5 - 6 * a) - Rational(1, 4) * (Rational(1, 3) * a - 3)
print(sympy.latex(e))
No comments:
Post a Comment