Skip to content

Fix crash for non-numeric Pyfunction.eval - #532

Open
alexfikl wants to merge 2 commits into
symengine:mainfrom
alexfikl:evalf-symbolic-pyfunction
Open

alexfikl wants to merge 2 commits into
symengine:mainfrom
alexfikl:evalf-symbolic-pyfunction

Conversation

@alexfikl

@alexfikl alexfikl commented Sep 12, 2026 •

Copy link
Copy Markdown

The added test case would outright segfault before. This essentially tries to convert to a number and raises NotImplementedError if the expression is symbolic. That NotImplementedError is then caught by symengine/symengine#2173 and the expression is returned as is (which, as far as I know, matches sympy's behavior).

Needs: symengine/symengine#2173
xref: inducer/sumpy#306
cc: @inducer

@alexfikl
alexfikl force-pushed the evalf-symbolic-pyfunction branch from 0b76eaa to 2cd76d3 Compare October 6, 2026 11:18
@alexfikl
alexfikl marked this pull request as ready for review October 25, 2026 15:02
@alexfikl

Copy link
Copy Markdown
Author

The CI is currently failing because the test added here fails without symengine/symengine#2173. What's the workflow for that? Do we wait for a new release of symengine and update symengine_verson.txt?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant