-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BUG: Added missing error check in ndarray.__contains__
#15553
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
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.
Only style nits, otherwise looks good
Thanks, would you be happy to add a test as well? It will need to be an object which raises an error when you call |
Glad to add tests. I'm new here and did not quite understand when you say
|
This is the implementation of a python class with the specific behaviour, such as:
Since the code will also call |
Guys, I can't see a workaround, it's working in the shell but failing in the test script:
In shell:
Can you please help me. Apologies if it's a very basic doubt. |
No, that is not basic at all... The whole issue is far more complicated than it appears, and the DeprecationWarning (which is raised as an error in the test, you will see identical results with The "correct" test could be hacked by adding Maybe Eric anticipated this. I am OK with just putting it in without a test also, it gets complicated to cover the exact code path you are hitting... But you can add it referencing this issue with |
Oh I see, I guess we can add that UT after fixing the main issue. |
OK, I will just merge this for now. If anyone feels we should add the test with The test failures are unrelated due to some gfortran issue. |
ndarray.__contains__
Thanks for the merge @seberg, I'll try it myself and ask here if I'm stuck. |
Addes missing check for NULL return. resolves numpy#15552 resolves pandas-dev/pandas#31922
Added NULL checks.
resolves #15552
resolves pandas-dev/pandas#31922