-
Notifications
You must be signed in to change notification settings - Fork 281
Return NotImplemented for Expr and GenExpr operators to simplify
#1182
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
Open
Zeroto521
wants to merge
55
commits into
scipopt:master
Choose a base branch
from
Zeroto521:expr/notimplemented
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+222
−123
Open
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
34d712c
Refactor _expr_richcmp for type safety and clarity
Zeroto521 eff8a9f
Refactor type checks to use NUMBER_TYPES tuple
Zeroto521 a531bb3
Update operator overloads to return NotImplemented for invalid types
Zeroto521 a784346
Update type check in _expr_richcmp function
Zeroto521 3ce74b1
Improve type checking and error handling in expression ops
Zeroto521 7833fb4
Refactor division operator in Expr class
Zeroto521 57b2861
Refactor Expr arithmetic methods to simplify logic
Zeroto521 582283f
Merge branch 'master' into dep/_is_number(self)
Zeroto521 532dee4
Merge branch 'master' into dep/_is_number(self)
Joao-Dionisio 1d0e6f5
Refactor performance tests to use timeit and update assertions
Zeroto521 f67ec3b
use a fixed value for constant
Zeroto521 1515898
Merge branch 'master' into expr/notimplemented
Zeroto521 66fcf0a
Merge branch 'dep/_is_number(self)' into expr/notimplemented
Zeroto521 f2dae45
remove `_is_number`
Zeroto521 9083957
Refactor type checks and arithmetic in Expr and GenExpr
Zeroto521 6fcc519
Merge branch 'master' into expr/notimplemented
Zeroto521 106e2f3
Update changelog for NotImplemented return in Expr classes
Zeroto521 38129ab
Refactor operator type checks for Expr and GenExpr
Zeroto521 736bc0d
Update changelog entry for Expr and GenExpr operators
Zeroto521 59591fc
Fix type checks and error messages in expr and scip modules
Zeroto521 4859daa
Fix type check in _expr_richcmp function
Zeroto521 9c9355f
Ensure exponent base is float in GenExpr
Zeroto521 66b27c5
Ensure float conversion in exponentiation
Zeroto521 3c88e82
Remove _is_number from incomplete stubs
Zeroto521 cad83ff
Fix multiplication with numeric types in Expr
Zeroto521 183b1af
Improve type handling in readStatistics parsing
Zeroto521 0dca5c2
Merge branch 'master' into expr/notimplemented
Zeroto521 4d84056
Return computed res when creating Expr
Zeroto521 0d4a6c2
Merge branch 'master' into expr/notimplemented
Zeroto521 c385d5e
Merge branch 'master' into expr/notimplemented
Zeroto521 2f1d21d
Return NotImplemented for unsupported expr RHS
Zeroto521 268abff
Remove duplicate import in expr.pxi
Zeroto521 58574ad
Use PyNumber_Check for numeric type checks
Zeroto521 9c1cc6c
Treat NumPy arrays as non-numeric in expr
Zeroto521 51a2183
Merge remote-tracking branch 'upstream/master' into expr/notimplemented
Zeroto521 968cda4
Merge remote-tracking branch 'upstream/master' into expr/notimplemented
Zeroto521 03ce35c
Use helper predicates for expr type checks
Zeroto521 233bac1
Use Cython <double> cast instead of float()
Zeroto521 bfe7c18
Handle np.ndarray and raise on bad types
Zeroto521 253c2b4
Improve TypeError message in buildGenExprObj
Zeroto521 3f0358a
Add tests for TypeError on invalid expr ops
Zeroto521 582fc96
Type-annotate __richcmp__ op as int
Zeroto521 1450215
Convert _expr_richcmp to cython function
Zeroto521 f347bb3
Accept numpy scalar types in expr annotations
Zeroto521 ea18c2c
Add tests for Expr/GenExpr ops and numpy
Zeroto521 2854737
Add tests for Expr/GenExpr array interactions
Zeroto521 62e0978
Merge branch 'master' into expr/notimplemented
Joao-Dionisio d592271
Tweak genexpr comparison TypeError tests
Zeroto521 f3ec438
Refine _is_number type checks
Zeroto521 436ef8e
if other is 0, 1/other won't raise ZeroDivisionError
Zeroto521 0091af6
Merge branch 'master' into expr/notimplemented
Zeroto521 5f74651
Validate expr type before coercion
Zeroto521 8220d70
Narrow except to ValueError/TypeError
Zeroto521 9043dda
Use C API checks for numeric types in expr
Zeroto521 dbee0f9
Rename parameter o to x in expr helpers
Zeroto521 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.