Skip to content

fix: numpy 2 prefers asarray() instead of copy=False #2488

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

reneleonhardt
Copy link
Contributor

I read in an issue that in some cases np.array(copy=False) fails: #2479 (comment)
It's recommended to migrate to np.asarray() (without copy):
https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword

Copy link
Collaborator

@jakesabathia2 jakesabathia2 left a comment

Choose a reason for hiding this comment

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

@reneleonhardt
Copy link
Contributor Author

You're welcome! Everything was green, can you see if there were unexpected performance regressions?

@reneleonhardt
Copy link
Contributor Author

By the way, if speed (of your builds) is a concern to you, maybe you could look into https://codspeed.io it's free for Open-Source projects: https://docs.codspeed.io/integrations/ci/gitlab-ci

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.

3 participants