Feat: doctest for composing Expressions
This commit is contained in:
parent
f8e1c7f962
commit
a5f062a151
@ -461,6 +461,8 @@ class Expression(object):
|
||||
<Quadratic 3n^2 + 2n + 1>
|
||||
>>> f("u_n")
|
||||
<Exp: 3u_n^2 + 2u_n + 1>
|
||||
>>> f(f)
|
||||
<Polynomial 36x^2 + 16x + 6 + 36x^3 + 27x^4>
|
||||
"""
|
||||
tree = self._tree
|
||||
variable = (set(tree.get_leafs(extract_variable)) - {None}).pop()
|
||||
|
Loading…
Reference in New Issue
Block a user