Skip to content
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

Handle non-standard unicode characters in models #282

Merged
merged 3 commits into from
Feb 17, 2024
Merged

Handle non-standard unicode characters in models #282

merged 3 commits into from
Feb 17, 2024

Conversation

bgyori
Copy link
Member

@bgyori bgyori commented Feb 17, 2024

This PR adds handling for non-standard Unicode characters (that aren't allowed to appear in Python variable names) in models. It does this by using NFKC normalization (which Python's eval uses internally) on expression strings before parsing them into sympy Expressions. This normalization is only applied locally when parsing an expression and otherwise preserves the original model's symbols.

Fixes #281

@bgyori bgyori merged commit 766cab2 into main Feb 17, 2024
4 checks passed
@bgyori bgyori deleted the epsilon branch February 21, 2024 15:05
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.

Model from JSON loading issue
1 participant