Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
0 votes

Hi everyone,
I would like to apply an operator on both sides of an equation. What do you think is the best approach to do it? The idea is that I don't want to rewrite the equation with the applied operator by hand :) I tried with the following code:

scL := A = B_J C^J
lhs_scL = manip.get_lhs(scL)
rhs_scL = manip.get_rhs(scL)
var_scL := \delta_{I}{@(lhs_scL)} = \delta_{I}{@(rhs_scL)};

But it gives me the error RuntimeError: Python object '\prod' does not exist.

Thanks, Mattia

asked in General questions by (410 points)

1 Answer

0 votes

Cool one. There is a subtle bug in the parser which fails on these Python names with underscores. If you replace lhs_scL with lhsscL and ditto for the rhs version, things work. Will fix, hopefully the workaround above can keep you going in the meantime.

answered by (54.1k points)

Thanks Kasper!