``global_dict`` input ignored in version 2.8.7
euklid321 opened this issue · 5 comments
euklid321 commented
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 commented
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 commented
should be closed by #457