There is a comment in all.py in raise_func that says "occasionally a coefficient can show up (not cool, so consider the inclusion of coeff here a patch)". This is because some special inputs for operand in the parent __call__ function ultimately resulted in a coefficient appearing in dic, which SHOULD NEVER HAPPEN.
(composition, coeff) = dic.items()[0]
captures the coefficient of the operand in coeff. coeff SHOULD always be 1. I never figured out what was causing this. Although the current code is a working workaround, I think there is an underlying issue that should be fixed!
There is a comment in
all.py
inraise_func
that says "occasionally a coefficient can show up (not cool, so consider the inclusion of coeff here a patch)". This is because some special inputs foroperand
in the parent__call__
function ultimately resulted in a coefficient appearing in dic, which SHOULD NEVER HAPPEN.captures the coefficient of the operand in
coeff
.coeff
SHOULD always be1
. I never figured out what was causing this. Although the current code is a working workaround, I think there is an underlying issue that should be fixed!