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

Numpy 2.0 compatibility #1420

Merged
merged 3 commits into from
Jun 26, 2024
Merged

Numpy 2.0 compatibility #1420

merged 3 commits into from
Jun 26, 2024

Conversation

PaulJonasJost
Copy link
Collaborator

@PaulJonasJost PaulJonasJost commented Jun 24, 2024

Changed through ruff check path/to/code/ --select NPY201 as explained here

@PaulJonasJost PaulJonasJost self-assigned this Jun 24, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.89%. Comparing base (825550a) to head (6ebaa77).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1420      +/-   ##
===========================================
+ Coverage    82.02%   83.89%   +1.86%     
===========================================
  Files          160      160              
  Lines        13107    13107              
===========================================
+ Hits         10751    10996     +245     
+ Misses        2356     2111     -245     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@Doresic Doresic left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

setup.cfg Outdated
@@ -47,7 +47,7 @@ keywords =

[options]
install_requires =
numpy >= 1.19.1, != 1.24.0
numpy >= 2.0
Copy link
Member

Choose a reason for hiding this comment

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

None of the changes here requires numpy >= 2.0, right?

@@ -47,7 +47,7 @@ keywords =

[options]
install_requires =
numpy >= 1.19.1, != 1.24.0
numpy >= 1.19.1, != 1.24.0, < 2.0
Copy link
Member

Choose a reason for hiding this comment

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

I think either requiring <2.0 or >=2.0 will be a pain to users, so I'd avoid that here.

The current issue with nlopt can be solved by installing numpy<2.0 specifically in the respective tox env. (Consider opening an nlopt issue regarding numpy2.0 support if there isn't any yet.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed. Changed it accordingly for now.

@PaulJonasJost PaulJonasJost marked this pull request as ready for review June 25, 2024 12:54
@PaulJonasJost PaulJonasJost merged commit 1a3123d into develop Jun 26, 2024
18 checks passed
@PaulJonasJost PaulJonasJost deleted the numpy_2.0 branch June 26, 2024 08:26
This was referenced Jul 25, 2024
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.

4 participants