-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sympy type conversions to GPR (#1158)
* starting to use sympy * adding as_symbolic and equality operation to GPR * Starting to test GPR symbolics * symbolic and equality is working * black and isort * includes sympifier visitor * get as_symbolic to work. Fixed equality. Added and modified tests * Fixed equality cases of Symbol vs And/Or. Added and modified tests * alternate methods work. Added benchmark test for as_symbolic * some documentation and formatting * if using sympy::Symbol() instead of sympy::symbols(), don't need to replace certain characters * black and isort * some modifications of the import logic to make it create when using sympy.logic.boolag.And and Or * Removed alternate methods of conveting to sympy * black.isort. Remove future * fixed bug in tests * Minor fix to simplify if * minor isort error fixed * isort contradicts with black, so the comment was moved down * First attempt at from_symbolic * tests for from_symbolic * some tidying. Correcting for weird edge cases that shouldn't really happen unless you're accessing private GPR methods. * add type hint to gpr __eq__ * starting to use sympy * adding as_symbolic and equality operation to GPR * Starting to test GPR symbolics * symbolic and equality is working * black and isort * includes sympifier visitor * get as_symbolic to work. Fixed equality. Added and modified tests * Fixed equality cases of Symbol vs And/Or. Added and modified tests * alternate methods work. Added benchmark test for as_symbolic * some documentation and formatting * if using sympy::Symbol() instead of sympy::symbols(), don't need to replace certain characters * black and isort * some modifications of the import logic to make it create when using sympy.logic.boolag.And and Or * Removed alternate methods of conveting to sympy * black.isort. Remove future * fixed bug in tests * Minor fix to simplify if * minor isort error fixed * isort contradicts with black, so the comment was moved down * First attempt at from_symbolic * tests for from_symbolic * some tidying. Correcting for weird edge cases that shouldn't really happen unless you're accessing private GPR methods. * add type hint to gpr __eq__ * update to newer devel * clarify type of helper functions powerset_ne and all_except_one * fix test_gpr.py Co-authored-by: uri.akavia <uri.akavia@mcgill.ca>
- Loading branch information
Showing
3 changed files
with
365 additions
and
13 deletions.
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
Oops, something went wrong.