You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in BinOp.conform in pandas.computation,pytables there is this code:
def conform(self, rhs):
""" inplace conform rhs """
if not com.is_list_like(rhs):
rhs = [rhs]
if hasattr(self.rhs, 'ravel'):
rhs = rhs.ravel()
return rhs
I think this is wrong. The first test checks rhs, but the second checks self.rhs. They should both check one or the other. I think both should check local rhs but 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, both if blocks execute, meaning that it sets rhs to a list and then tries to call ravel on 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.
The text was updated successfully, but these errors were encountered:
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 localrhs
but 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, bothif
blocks execute, meaning that it setsrhs
to a list and then tries to callravel
on 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.The text was updated successfully, but these errors were encountered: