Currently any field or operator can have a name manually assigned via its name attribute. If this is not specified at operator instantiation, it will be created based on the name of the operator and operands. When the operator is evaluated, the resulting field inherits the same name. This is useful for keeping track of how operators are created, but can make it confusing to identify the structure of a complicated operation (e.g. what exactly are the operands) just from the string form.
One idea would be to introduce brackets, or some other notation to distinguish operators from the resulting operands. E.g.
>>> f = u + v
>>> print(f)
u + v
>>> g = 2 * f
>>> print(g)
2 * (u + v)
>>> g_eval = g.evaluate()
>>> print(g_eval)
[2 * (u + v)]
Currently any field or operator can have a name manually assigned via its
name
attribute. If this is not specified at operator instantiation, it will be created based on the name of the operator and operands. When the operator is evaluated, the resulting field inherits the same name. This is useful for keeping track of how operators are created, but can make it confusing to identify the structure of a complicated operation (e.g. what exactly are the operands) just from the string form.One idea would be to introduce brackets, or some other notation to distinguish operators from the resulting operands. E.g.
Other suggestions are welcome.