EnergySystemsModellingLab / MUSE_OS

Welcome to the MUSE-OS repository
https://muse-os.readthedocs.io/en/latest/
GNU General Public License v3.0
22 stars 8 forks source link

Incompatible with Numpy 2.0 [BUG] #345

Open tsmbland opened 1 week ago

tsmbland commented 1 week ago

Describe the bug

MUSE doesn't seem happy with numpy 2.0, so we've had to pin the numpy version to <2.0 for now.

We will want to unpin the version, but will need to make a number of changes to the codebase so that it can support numpy 2.0

Ruff has already flagged an issue in quantities.py to do with np.infty (needs changing to np.inf), but this alone isn't enough to fix the problems.

These seem to be the most common errors: TypeError: clip() got an unexpected keyword argument 'out' TypeError: __array_wrap__() takes from 2 to 3 positional arguments but 4 were given

but I'm not sure exactly what they refer to. Someone will need to investigate...

To Reproduce

Install numpy 2.0 and run the tests, or run the github workflow

Context

Please, complete the following to better understand the system you are using to run MUSE.