Pyomo / pyomo

An object-oriented algebraic modeling language in Python for structured optimization problems.
https://www.pyomo.org
Other
1.99k stars 512 forks source link

Incompatibility with numpy 2.0 #3308

Closed julvez closed 2 months ago

julvez commented 3 months ago

Hi!

The following imports (last versions of both pyomo and numpy):

import numpy import pyomo

yield the following error:

AttributeError: np.float_ was removed in the NumPy 2.0 release. Use np.float64 instead.. Did you mean: 'float16'?

Best, Jorge

michaelw924 commented 3 months ago

I second this issue, but looks like it was already discussed here...

https://github.com/Pyomo/pyomo/issues/3290

mrmundt commented 2 months ago

@julvez - Thanks for submitting this. If you are on a released version (e.g., if you installed from conda or pypi), then you do not have the latest updates. We added numpy2 compatibility in #3292 but have not yet released a new full version of Pyomo.

In the future, please use the template provided. In particular, we need answers to the following:


Information on your system

Pyomo version: Python version: Operating system: How Pyomo was installed (PyPI, conda, source): Solver (if applicable):