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

global_dict input ignored in version 2.8.7 #456

Closed
euklid321 opened this issue Oct 25, 2023 · 5 comments
Closed

global_dict input ignored in version 2.8.7 #456

euklid321 opened this issue Oct 25, 2023 · 5 comments
Labels

Comments

@euklid321
Copy link

With numexpr=2.8.7, the global dict input of numexpr.evaluate seems to be ignored:

import numexpr as ne

a = 1
b = 1

print(ne.evaluate("a + b + c", global_dict={"c": 1}))

# Result with numexpr=2.8.4
# 3

# Results with numexpr=2.8.7
# KeyError: 'c'
@27rabbitlt
Copy link
Contributor

This is caused by adding validate function and changing the logic of evaluate function.

evaluate function will firstly call validate and if nothing wrong then call re_evaluate. But re_evaluate previously doesn't take global_dict as an argument, which causes the bug.

@27rabbitlt
Copy link
Contributor

should be closed by #457

Copy link

Message to comment on stale issues. If none provided, will not mark issues stale

@github-actions github-actions bot added the Stale label Feb 17, 2024
@FrancescAlted
Copy link
Contributor

This can be closed, right @27rabbitlt and @euklid321 ?

@27rabbitlt
Copy link
Contributor

27rabbitlt commented Feb 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants