Skip to content

Chooses eval engine automatically depending on whether numexpr is installed #12605

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

Closed
wants to merge 2 commits into from

Conversation

robintw
Copy link
Contributor

@robintw robintw commented Mar 13, 2016

Fixes #12008

@jreback jreback added Numeric Operations Arithmetic, Comparison, and Logical operations Compat pandas objects compatability with Numpy or Python functions labels Mar 13, 2016
@jreback
Copy link
Contributor

jreback commented Mar 13, 2016

can you add some tests for this (e.g. the example from the issue).
The 2.7_LOCALE build (the 2nd one down on the travis builds), does NOT have numexpr installed (its the only one). So if you mark this tests as slow it will get run there (and should pass with the python parser) and on the other builds (don't mark as slow) with the numexpr engine.

So the tests should assert the state of _NUMEXPR_INSTALLED (IOW whichever you are actually testsing), then run the query. I don't think there is an easy way to figure out which engine is actually used (we may have to do some gymnastics here to assert that)

@jreback jreback added this to the 0.18.1 milestone Mar 13, 2016
@jreback
Copy link
Contributor

jreback commented Mar 13, 2016

this needs a whatsnew note, put in API changes (even though it is more of a bug-fix)

@robintw
Copy link
Contributor Author

robintw commented Mar 13, 2016

Which whatsnew file should it be put in? 0.18.1?

Also, I'm a little confused about the tests: surely the test is either marked as slow or not marked as slow? I assume the tests should go in test_query_eval.py, but having looked at the tests in there I would have thought they would have caught this bug previously...

I'm happy to have a go at writing a test, with a bit of help, but I may not be the best person to do this - and someone else may be able to do it in a tiny fraction of the time.

@jreback
Copy link
Contributor

jreback commented Mar 13, 2016

0.18.1

you need 2 tests the same 1 slow and 1 not-slow (don't mark it)
they will be run in separate builds

@jreback
Copy link
Contributor

jreback commented Apr 17, 2016

replaced by 504ad46

but #12867 is still relevant (e.g. we may want to show a PerformanceWarning when numexpr is not installed

@jreback jreback closed this Apr 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Numeric Operations Arithmetic, Comparison, and Logical operations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants