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
Make count_ops() work with logic operations by creating a binary tree. #7303
Merged
Merged
Changes from 25 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
cefd428
Make count_ops() work with logic operations by creating a binary tree…
sahilshekhawat 5389065
Added tests of the logic functions for count_ops() function.
sahilshekhawat 7000d9e
Fixed a test case of Xor(x,y) = 2*AND + OR
sahilshekhawat 3c5ba38
Fixed the test case for Nand(x,y).count_ops(visual=True) = OR and Nor…
sahilshekhawat 07168de
Removed the obsolete test case which was addressing the bug.
sahilshekhawat 25a9686
Included the case of logic function in the "else" case.
sahilshekhawat d5abbd7
removed the XXX comment to report bug.
sahilshekhawat 366f864
Removed the case for logic functions because it was contradicting wit…
sahilshekhawat 00604b1
Final commit, added the logic function to be counted in count_ops()
sahilshekhawat d374ed5
remove the else condition and added the is.Boolean condition to gener…
sahilshekhawat d277512
Removed redundant tests count_ops(Basic()) = S.zero
sahilshekhawat dc6cf28
Removed trailing whitespaces, will always check them first.
sahilshekhawat ee126ac
Added the cases to handle the exception of True and False, who were b…
sahilshekhawat b49c02c
Fixed the bug.
sahilshekhawat 2f7d1de
Merge branch 'master' of https://github.com/sympy/sympy
sahilshekhawat e1c8ea4
Fix the bug due to which `Basic()` was counted as an operation and us…
sahilshekhawat 7adde66
Added more tests which also include some complex ones.
sahilshekhawat cc74cd8
removed extra spaces
sahilshekhawat 80fd37a
removed ``true`` and ``false`` and used ``not a.args is ()`` instead …
sahilshekhawat 912c0fd
Replace "is" with "==" to check the conditions.
sahilshekhawat 9549f0b
replaced 'is' with '=='
sahilshekhawat 37ba49b
Added tests to include cases of logic functions given less arguments …
sahilshekhawat 4fbde7b
removed Basic and Tuple check
sahilshekhawat 9771a86
Added more test related to Basic()
sahilshekhawat 5d3950d
Added logical test for TUPLE and removed duplicate tests
sahilshekhawat 189c659
removed some tests which were showing bugs in logical functions.
sahilshekhawat File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I would just remove these tests. They are all either things that don't make sense or operations that return a different object than what is started with. I think these tests are just confusing, especially if any of these things are changed.
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.
okay! i am commiting after removing these.