Просто doit
:
>>> TestExp.subs({FuncT(xx,yy):xx}).subs({xx:1,yy:0.1}).doit()
-0.588501117255346
Как узнать, как использовать doit
?
Когда я печатаю (не pprint
) выражения, которые вижу
cos(Subs(Derivative(x, x), x, 1) + 1.2)
Я не хочу Subs
там, но я не знаю много о Subs
, поэтому я прошу помощи и читаю следующее:
>>> help(Subs)
...
There's no automatic expansion - use the method .doit() to effect all
possible substitutions of the object and also of objects inside the
expression.
...