-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Canonical recursive #432
base: master
Are you sure you want to change the base?
Canonical recursive #432
Conversation
… edge cases with sum containing 1 var
After discussing offline: an alternative can be to merge this code into |
do we want to cover division as well? I guess it would make sense to do. |
|
||
if lhs.name == "sum": | ||
lhs_weights = [1]*len(lhs.args) + extra_weights |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra_weights will not be defined if the rhs is an operator other than sum or wsum (like div or mul or whatever)
Made canonical comparison fully recursive.
This covers some dangling edge cases I found such as having a sum with only one argument.
Also cleaned up the code a bit : )