sympy

Poul Riis priisdk at gmail.com
Wed Mar 30 07:17:14 EDT 2016


Is it possible to transfer results from sympy to 'normal' python.

In the case below I think my intention is clear enough but it does not work as intended. How can it be done?

Poul Riis




from sympy import *
x=Symbol('x')
ftext=diff(1/(x**2+1),x)

def f(t):
    return ftext.subs(x,'t')

print(f(3))



More information about the Python-list mailing list