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

RFC: avoid usage of deprecated numpy.core namespace (numpy 2 compat) #4829

Merged

Conversation

neutrinoceros
Copy link
Member

@neutrinoceros neutrinoceros commented Feb 25, 2024

PR Summary

Combined with #4806, this replaces usages of numpy.core with public API.

Context: np.core was always private API, but in numpy 2.0, it was moved to np._core to make it clearer. np.core continues to be available as an alias for now but importing from it now triggers deprecation warnings. In the few places that we actually import it, we can now easily switch to public API, so let's.

Copy link
Member

@matthewturk matthewturk left a comment

Choose a reason for hiding this comment

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

As long as there're no problems with backcompat, this looks good!

@neutrinoceros neutrinoceros added this to the 4.3.1 milestone Feb 25, 2024
@neutrinoceros neutrinoceros added bug refactor improve readability, maintainability, modularity labels Feb 25, 2024
@neutrinoceros
Copy link
Member Author

All green, including jobs with oldest numpy we support, so merging !

@neutrinoceros neutrinoceros merged commit 3bf116a into yt-project:main Feb 25, 2024
13 checks passed
@neutrinoceros neutrinoceros deleted the numpy2/avoid_private_API branch February 25, 2024 13:14
meeseeksmachine pushed a commit to meeseeksmachine/yt that referenced this pull request Feb 25, 2024
neutrinoceros added a commit that referenced this pull request Feb 25, 2024
…9-on-yt-4.3.x

Backport PR #4829 on branch yt-4.3.x (RFC: avoid usage of deprecated usage numpy.core (numpy 2 compat))
@neutrinoceros neutrinoceros changed the title RFC: avoid usage of deprecated usage numpy.core (numpy 2 compat) RFC: avoid usage of deprecated numpy.core namespace (numpy 2 compat) Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug refactor improve readability, maintainability, modularity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants