A simple solution for now to detect if the value of the assignment is a binary op, and if left or right is a reduction call, like np.sum or np.max etc. If so insert a new assignment and replace the old call with a new temp var.
would become
__tmp_var = np.sum(b)
a = a - __tmp_var
A simple solution for now to detect if the value of the assignment is a binary op, and if left or right is a reduction call, like
np.sumornp.maxetc. If so insert a new assignment and replace the old call with a new temp var.would become