-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Fix mistake in Pytables querying with numpy scalar value. Fixes #11283 #11291
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
Conversation
Could you please add a note to the bug fixes section of the release notes? Also, be sure to include |
lgtm. pls squash. ping on green. |
@@ -129,7 +129,7 @@ def conform(self, rhs): | |||
""" inplace conform rhs """ | |||
if not com.is_list_like(rhs): | |||
rhs = [rhs] | |||
if hasattr(self.rhs, 'ravel'): | |||
if hasattr(rhs, 'ravel'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually this might be better to call: np.array(rhs)
, I don't really remember why I did this in the first place. Maybe you can divine some things from the test cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not idiomatic to check for an array
just because it works doesn't mean it's correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So are you saying it should be if isinstance(rhs, np.ndarray)
? That seems to work okay.
b760c49
to
f1c2e9a
Compare
@jreback Are you saying to do The fix is working fine now. |
f1c2e9a
to
314ed45
Compare
Fix mistake in Pytables querying with numpy scalar value. Fixes #11283
thanks |
Fixes #11283
First PR to this project. The fix is minuscule, but let me know if I did anything awry.