numexpr icon indicating copy to clipboard operation
numexpr copied to clipboard

Added local_dict to NumExpr constructor call in evaluate.

Open hoskv opened this issue 6 years ago • 2 comments

I tried to add functions (minimum, maximum) to numexpr2 and found that first, there are no more opcodes available, and second that these functions are already in the 3.0 branch. So I'm upgrading my project to use 3.0 and this is the only problem I had.

Thank you for this repo - it's awesome.

hoskv avatar Aug 26 '19 16:08 hoskv

Instead of using local_dict as a kwarg,

my_dict = {a: 4, 
           b: 5}
neObj(local_dict=my_dict)

can you not use

neObj(**my_dict)

?

robbmcleod avatar Aug 26 '19 16:08 robbmcleod

I don't follow. My project makes extensive use of the numexpr.evaluate function that the 3.0 branch still provides as a convenience (which I certainly appreciate). But the local_dict kwarg in the function isn't getting passed on to the class constructor.

hoskv avatar Aug 26 '19 17:08 hoskv