Update SympyToPymbolic mapper annotations#249
Merged
inducer merged 4 commits intoinducer:mainfrom Oct 20, 2025
Merged
Conversation
alexfikl
commented
Oct 19, 2025
cd92aea to
b77e63c
Compare
alexfikl
commented
Oct 19, 2025
b77e63c to
d55c239
Compare
d55c239 to
71eb537
Compare
alexfikl
commented
Oct 19, 2025
alexfikl
commented
Oct 19, 2025
sumpy/symbolic.py
Outdated
Comment on lines
271
to
290
| def find_power_of(base, prod): | ||
| def find_power_of(base: sym.Basic, prod: sym.Basic) -> int | sym.Basic: | ||
| remdr = sym.Wild("remdr") | ||
| power = sym.Wild("power") | ||
|
|
||
| result = prod.match(remdr*base**power) | ||
| if result is None: | ||
| return 0 | ||
|
|
||
| return result[power] |
Collaborator
Author
There was a problem hiding this comment.
This doesn't seem used and it also doesn't work with symengine as far as I can tell?
Owner
There was a problem hiding this comment.
If it's unused across sumpy and pytential, kill it!
Collaborator
Author
There was a problem hiding this comment.
Yeah, it doesn't seem to be used at anywhere. I also removed vector_xreplace below, which seems to have gone unused since 557ec67.
71eb537 to
0689efa
Compare
alexfikl
commented
Oct 19, 2025
0689efa to
60464cf
Compare
60464cf to
f8a5b0f
Compare
f8a5b0f to
4bb63c4
Compare
Owner
|
Ty! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
https://github.com/inducer/sumpy/actions/runs/18624857397
This fixes some of the new CI failures due to
pymbolicadding more typing to the interop classes. It also adds a bunch more type annotations tosumpy.symbolic, but those are pretty iffy.