Skip to content

COMPAT: .query/.eval should work w/o numexpr being installed if possible #12864

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 1 commit into from

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Apr 11, 2016

closes #12749

@jreback jreback added the Compat pandas objects compatability with Numpy or Python functions label Apr 11, 2016
@jreback jreback added this to the 0.18.1 milestone Apr 11, 2016
@jreback jreback force-pushed the numexpr_compat branch 3 times, most recently from 2aaf6a8 to 5a67bd4 Compare April 11, 2016 17:20
@@ -131,6 +131,7 @@ API changes



- the default for ``.query()/.eval()`` is now ``engine=None`` which will use ``numexpr`` if its installed, else will fallback to the ``python`` engine. This mimics the pre-0.18.1 behavior if ``numexpr`` is installed (and which previously would raise if ``numexpr`` was NOT installed and ``.query()/.eval()`` was used). (:issue:`12749`)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jorisvandenbossche @TomAugspurger wording make sense? This is really a bug fix, but wanted to highlite it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"its" -> "it's". Maybe change "and which would previously..." to "Previously, if numexpr was not installed, .query()/.eval() would raise."

Does it raise a PerformanceWarning when it falls back to python? Might be good to mention that here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no reason to show a PerformanceWarning. I guess we could, but the issue addressed here is thatt was raising an ImportError if you didn't have numexpr installed and DIDN't specify ``engine='python'` which was not the default

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue of showing a PerformanceWarning (good idea) is that we have to be careful when doing it, because for example string ops are by definition in python, so will create a separate issue for that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. +1 to this change.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

COMPAT: show warning when using numexpr not installed and defaulted
2 participants