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 breaks osier #59

Closed
victoraalves opened this issue Aug 29, 2024 · 1 comment · Fixed by #65
Closed

Numpy 2.0 breaks osier #59

victoraalves opened this issue Aug 29, 2024 · 1 comment · Fixed by #65
Labels
Comp:Build This issue has to do with the build system of the code/doc (makefiles, cmake, install errors) Difficulty:1-Beginner This issue does not require expert knowledge and may be a good issue for new contributors. Priority:2-Normal This work is important and should be completed ASAP. Status:1-New No one has claimed this issue yet. It is in need of solving. Type:Bug Something is wrong or broken. This issue or PR is related to a bug in code.

Comments

@victoraalves
Copy link

victoraalves commented Aug 29, 2024

Hi,

When running the tests after installing osier by following the installation instructions, I have the following error:

AttributeError: np.float_ was removed in the NumPy 2.0 release. Use np.float64 instead.

Which can be fixed by installing a pre-2.0 numpy version. I installed 1.26.4 and this seemed to fix the issue.

The definitive solution would be to follow the recommendation of using np.float64 as suggested by numpy itself.

@samgdotson samgdotson added Comp:Build This issue has to do with the build system of the code/doc (makefiles, cmake, install errors) Difficulty:1-Beginner This issue does not require expert knowledge and may be a good issue for new contributors. Priority:2-Normal This work is important and should be completed ASAP. Status:1-New No one has claimed this issue yet. It is in need of solving. Type:Bug Something is wrong or broken. This issue or PR is related to a bug in code. labels Sep 9, 2024
@samgdotson samgdotson added this to the JOSS publication -- Osier milestone Sep 9, 2024
@samgdotson
Copy link
Collaborator

Thanks @victoraalves for creating this issue and identifying the dependency conflict.
I believe this error comes from a conflict in Pyomo, rather than Osier Pyomo/pyomo#3290. I believe pinning Numpy < 2.0 will resolve the problem. I am working on updating the installer for osier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Comp:Build This issue has to do with the build system of the code/doc (makefiles, cmake, install errors) Difficulty:1-Beginner This issue does not require expert knowledge and may be a good issue for new contributors. Priority:2-Normal This work is important and should be completed ASAP. Status:1-New No one has claimed this issue yet. It is in need of solving. Type:Bug Something is wrong or broken. This issue or PR is related to a bug in code.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants