Skip to content
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

BUG: np.in1d bug on the object array (issue 17923) #18369

Merged
merged 3 commits into from
Feb 10, 2021

Conversation

AngelGris
Copy link
Contributor

BUG: np.in1d bug on the object array (closes #17923)

When calling np.in1d() method with array that contains tuples the comparison didn't work properly due to an underling issue with the unpacking of those tuples. To prevent this, and following the approach suggested by @tylerjereddy I changed the way the comparison is made for arrays of objects, adding a wrapper to those objects preventing tuples from being unpacked.

Unit tests for the failing cases mentioned in the issue were also added.

numpy/lib/arraysetops.py Outdated Show resolved Hide resolved
@AngelGris
Copy link
Contributor Author

This is my first contribution to Numpy, could anyone help me with the failing check please?

Copy link
Member

@BvB93 BvB93 left a comment

Choose a reason for hiding this comment

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

LGTM

@seberg seberg self-requested a review February 9, 2021 15:41
@charris charris merged commit 00f6ddb into numpy:master Feb 10, 2021
@charris
Copy link
Member

charris commented Feb 10, 2021

Thanks @AngelGris .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

np.in1d bug on the object array
3 participants