Gurobi / gurobi-optimods

Data-driven APIs for common optimization tasks
https://gurobi-optimods.readthedocs.io
Apache License 2.0
153 stars 32 forks source link

Fix numpy 2.0 and scipy 1.14 incompatibilities #148

Closed simonbowly closed 5 months ago

simonbowly commented 5 months ago

Run the following with numpy 1.26 and scipy 1.13:

python -X dev -Werror::DeprecationWarning -m unittest discover -b

Output shows two different warnings. From scipy:

DeprecationWarning: `getrow` is deprecated and will be removed in v1.14.0; use `X[[0]]` instead.

From numpy:

DeprecationWarning: `alltrue` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `all` instead.

scipy 1.14 is just recently released so this already causes a test error. We can't support numpy 2.0 until gurobipy does but should still fix the above issues.