Skip to content

Incompatible with Numpy 2.0 [BUG]  #345

@tsmbland

Description

@tsmbland

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.

  • Operative system (eg. Windows 10): all
  • MUSE version (eg. 1.0.1): dev
  • Installation method (eg. pipx, pip, development mode): dev
  • Python version (you can get this running python --version): 3.12 and 3.9

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions