pydata / numexpr

Fast numerical array expression evaluator for Python, NumPy, Pandas, PyTables and more
https://numexpr.readthedocs.io/en/latest/user_guide.html
MIT License
2.25k stars 212 forks source link

evaluate global_dict argument ignored #497

Closed gdementen closed 3 weeks ago

gdementen commented 3 months ago
>>> ne.evaluate('a', local_dict={'a': 1})
array(1, dtype=int32)
>>> ne.evaluate('a', global_dict={'a': 1})
KeyError: 'a'

The problem is a regression introduced in https://github.com/pydata/numexpr/commit/21ff376a0853aff6aea63343c6010d6434917319 because global_dict is not passed to re_evaluate (which does not support global_dict either)

FrancescAlted commented 3 months ago

Ok, so global_dict is not honored since that commit (May 23, 2023)? That probably means that not many people use it. Maybe should we deprecate it; or do you think there is some use for it? If so, a PR would be appreciated.

github-actions[bot] commented 1 month ago

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