-
Notifications
You must be signed in to change notification settings - Fork 663
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: in1d -> isin #4255
MAINT: in1d -> isin #4255
Conversation
* replace deprecated `in1d` with `isin` calls per numpy/numpy#24445, as part of effort to remain NumPy `2.0` compliant * the testsuite seems happy locally--if there are any cases where `in1d` was potentially receiving arrays with `ndim > 1`, we may want to add `ravel()` to the outputs in these replacements just to be safe, but I've assumed the testsuite has us covered * for now, I've intentionally not adjusted the docstring of our Cython `_in2d`, which refers to `in1d`; seems less critical for now
Linter Bot Results:Hi @tylerjereddy! Thanks for making this PR. We linted your code and found the following: Some issues were found with the formatting of your code.
Please have a look at the Please note: The |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #4255 +/- ##
===========================================
+ Coverage 93.40% 93.41% +0.01%
===========================================
Files 169 183 +14
Lines 22204 23309 +1105
Branches 4064 4064
===========================================
+ Hits 20740 21775 +1035
- Misses 948 1018 +70
Partials 516 516
☔ View full report in Codecov by Sentry. |
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.
CHANGELOG, other than that looks great.
* add an appropriate `CHANGELOG` entry per reviewer request
Ok, I added a |
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.
LGTM — failures are codecov and not relevant.
There's one fix to the CHANGELOG but I'll just add the suggestion.
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.
Thanks @tylerjereddy
replace deprecated
in1d
withisin
calls per API: Cleaningnumpy/__init__.py
and main namespace - Part 4 [NEP 52] numpy/numpy#24445, as part of effort to remain NumPy2.0
compliantthe testsuite seems happy locally--if there are any cases where
in1d
was potentially receivingarrays with
ndim > 1
, we may want to addravel()
to the outputs in these replacements just to be safe, but I've assumed the testsuite has us coveredfor now, I've intentionally not adjusted the docstring of our Cython
_in2d
, which refersto
in1d
; seems less critical for now📚 Documentation preview 📚: https://mdanalysis--4255.org.readthedocs.build/en/4255/