Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Mistake in BinOp.conform? #11283
Comments
|
if u can propose a fix gr8. |
jreback
added the
IO HDF5
label
Oct 11, 2015
jreback
referenced
this issue
Oct 11, 2015
Open
Pandas HDF query syntax is more restrictive than PyTables #11284
BrenBarn
commented
Oct 11, 2015
|
I already did propose a fix in my bug report above. It is a less-than-one-line fix: change |
|
ok pls submit a pr with tests pls |
BrenBarn
referenced
this issue
Oct 12, 2015
Merged
Fix mistake in Pytables querying with numpy scalar value. Fixes #11283 #11291
jreback
added this to the
0.17.1
milestone
Oct 12, 2015
jreback
added the
Bug
label
Oct 12, 2015
BrenBarn
pushed a commit
to BrenBarn/pandas
that referenced
this issue
Oct 13, 2015
|
|
314ed45
|
jreback
closed this
in #11291
Oct 13, 2015
jreback
added a commit
that referenced
this issue
Oct 13, 2015
|
|
jreback |
4a182d3
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BrenBarn commentedOct 10, 2015
in BinOp.conform in pandas.computation,pytables there is this code:
I think this is wrong. The first test checks
rhs, but the second checksself.rhs. They should both check one or the other. I think both should check localrhsbut I'm not really familiar with all the nuts and bolts here so I'm not sure.This causes failures when doing HDF5 queries making use of a local variable whose value is a single Numpy value (e.g., a float64). Because even a single numpy value has
ravel, but it is not list-like, bothifblocks execute, meaning that it setsrhsto a list and then tries to callravelon it. This leads to a difficult-to-debug error because the exception is caught at a higher level and replaced with an "Invalid query syntax" error message.