Skip to content

Conversation

@fredsonnenwald
Copy link

Context

np.in1d has been removed as of NumPy 2.4.0, and thus get_connectivity calls fail with NumPy >= 2.4. This PR fixes the corresponding issue #4768 where this was reported.

Change Summary

np.isin is a direct replacement, and so has been substituted for the single np.in1d call I could find in the code.

Rationale

This substitution follows the recommendation of the NumPy documentation:

Use isin instead of in1d for new code.

Impact

Restores the functionality of reading the mesh using CaseFile as described in https://fluent.docs.pyansys.com/version/stable/user_guide/offline/case_file.html.

Copilot AI review requested due to automatic review settings December 23, 2025 14:26
@ansys-cla-bot
Copy link

ansys-cla-bot bot commented Dec 23, 2025

All Contributor License Agreement (CLA) signatures have been captured successfully. Thanks for contributing!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the codebase to replace the deprecated np.in1d function with np.isin to maintain compatibility with NumPy 2.4.0 and later versions, where np.in1d has been removed.

  • Single function call replacement from np.in1d to np.isin in the mesh connectivity processing logic
  • Follows NumPy's official migration recommendation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant