Conversation
Co-authored-by: Amin Sadeghi <amin.sadeghi@live.com>
np.in1d was deprecated in NumPy 1.25 and removed from the main namespace in NumPy 2.x, but pyproject.toml pins numpy>=2. Several core functions therefore raise 'AttributeError: module numpy has no attribute in1d' on a supported NumPy version, breaking e.g. find_nearby_pores, site/bond percolation cluster filtering and neighbor queries. Replace the remaining np.in1d call sites with np.isin, the documented drop-in replacement (identical semantics for 1-D inputs, including the invert= keyword). The codebase already uses np.isin elsewhere, so this also unifies the idiom.
Fix NumPy 2.x compatibility: replace removed np.in1d with np.isin
updating the version number handling
Member
Author
|
@copilot resolve the merge conflicts in this pull request |
|
@jgostick I can’t apply these changes because the pull request’s branch is the repository’s default branch, which I’m not allowed to push to directly. You can ask me to create a new pull request with the requested changes instead and I'll open a separate PR on a new branch. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release #3057 +/- ##
=======================================
Coverage 87.8% 87.8%
=======================================
Files 151 151
Lines 8882 8882
=======================================
Hits 7804 7804
Misses 1078 1078 🚀 New features to boost your workflow:
|
jgostick
commented
Jul 21, 2026
jgostick
left a comment
Member
Author
There was a problem hiding this comment.
Not sure how the new bump-version will work, but let's try it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a PR to work with numpy >= 2.2 so it should be released as a patch.