Skip to content

Conversation

@Mateasek
Copy link

@Mateasek Mateasek commented Dec 9, 2025

Description of work

Adds compatibility with numpy>2 while keeping compatibility with numpy<2

Fixes

Implements #87 #86: It seems it was enough to replace np.fromstring with np.frombuffer, tested for numpy < 2 and numpy > 2.

Pytests were also updated (np.bool -> np.bool_) to be compatible with numpy < 2 and numpy > 2

To test

I could not pass server tests, but I don't think that is relevant to this PR, dataclass tests pass. I also tested by remotely getting data from JET ppfs. It worked and the data made sense.

Reviewer checklist

  • The author suggested tests are successful.
  • Relevant documentation (user and developer) has been added, and is clear and complete.
  • Suitable unit tests have been added. If unit tests are not included in this MR, please comment as to why and create an issue to address this.

Copy link

@BradleyMak BradleyMak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @Mateasek! The changes you've made look good, but the issue described actually upgrading the version of numpy used to >=2.0.0, so the poetry configuration (in pyproject.toml and poetry.lock) should also be updated in this MR to reflect that, ensuring that any related dependencies are also upgraded if required. Once this has been added, I'll do some more testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants