Change "instances" class variables of Smybols and children of Symbols to Dict instead of List. Start expand.py (not completed)
This commit is contained in:
parent
77c8973eb7
commit
1738fa5d4c
6 changed files with 41 additions and 27 deletions
14
python_symb/TreeModification/expand.py
Normal file
14
python_symb/TreeModification/expand.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
from python_symb.Expressions.expr import Expr
|
||||
from python_symb.MathTypes.symbols import Var
|
||||
from python_symb.MathTypes.operator_file import Operator, BinOperator, Add, Mul
|
||||
|
||||
def expand(expr: Expr) -> Expr:
|
||||
"""
|
||||
Expand an expression
|
||||
:param expr: expression to expand
|
||||
:return: expanded expression
|
||||
"""
|
||||
|
||||
if expr.is_leaf:
|
||||
return expr
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue