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

MAINT: Remove np.in1d function calls #54694

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

mtsokol
Copy link
Contributor

@mtsokol mtsokol commented Aug 22, 2023

Hi!
This PR changes np.in1d calls to np.isin as np.in1d is being made private in numpy/numpy#24445.

I wasn't sure if arrays passed to it are surely 1d, therefore I called .ravel() to fully reproduce in1d behavior. If any of these lines actually operate on 1d arrays, then isin and in1d can be used interchangeably.

@mroeschke mroeschke added the Compat pandas objects compatability with Numpy or Python functions label Aug 22, 2023
@mroeschke mroeschke added this to the 2.1 milestone Aug 22, 2023
@mroeschke mroeschke merged commit 487c594 into pandas-dev:main Aug 22, 2023
37 checks passed
@mroeschke
Copy link
Member

Thanks @mtsokol

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Aug 22, 2023
mroeschke pushed a commit that referenced this pull request Aug 23, 2023
…calls) (#54697)

Backport PR #54694: MAINT: Remove `np.in1d` function calls

Co-authored-by: Mateusz Sokół <8431159+mtsokol@users.noreply.github.com>
@mtsokol mtsokol deleted the remove-np-in1d-calls branch August 23, 2023 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants