Feat: doctest for composing Expressions
This commit is contained in:
parent
3e258b2d41
commit
7600962fe4
@ -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