Skip to content

Fixed bug. Added in check for ufunc and evaluates inner expression be… #33613

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 8 commits into from

Conversation

SurajH1
Copy link
Contributor

@SurajH1 SurajH1 commented Apr 17, 2020

@pep8speaks
Copy link

pep8speaks commented Apr 17, 2020

Hello @SurajH1! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-05-16 00:21:35 UTC

@SurajH1
Copy link
Contributor Author

SurajH1 commented Apr 19, 2020

Is this ready to be accepted @maintainters @jbrockmendel

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

pls write tests first

@jreback jreback added the Numeric Operations Arithmetic, Comparison, and Logical operations label Apr 19, 2020
@SurajH1
Copy link
Contributor Author

SurajH1 commented Apr 20, 2020

any suggestions on why the failures are only occurring on some systems? @jreback

@vmuriart
Copy link

I tested this branch locally using a function that makes multiple arguments, and it isn't working properly either. It isn't parsing the multiple arguments correctly.

import pandas as pd
from  numpy import *

print(pd.__version__)

r = pd.eval("floor(1+5)")
print(r)

r = pd.eval("minimum(1 + 5, 4)")  # This one fails
print(r)

@vmuriart
Copy link

any suggestions on why the failures are only occurring on some systems? @jreback

Looking at the Azure CI output logs, it looks like you are failing on the environments that are testing the minimum versions, in particular, the lowest version of numexpr. There seems to be an if branch that specifically tries to handle the floor function. You could try written the test with a different function that isn't floor, or fix the if statement causing this error. (pandas/core/computation/ops.py:602: ValueError)

The Travis CI failures look like they are on environments that have numba installed. Here I am totally guessing, but I imagine that the failing operations use the eval capability somewhere internally, and that your changes are causing them to now fail.

@jreback
Copy link
Contributor

jreback commented Jun 14, 2020

can you merge master and get this passing and will have a look

@jreback
Copy link
Contributor

jreback commented Aug 7, 2020

closing as stale, if you'd like continue, pls ping.

@jreback jreback closed this Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Numeric Operations Arithmetic, Comparison, and Logical operations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'BinOp' object has no attribute 'value' Issue while calling global functions in eval and importing numpy
5 participants