Skip to content

Conversation

@12buntu
Copy link
Contributor

@12buntu 12buntu commented Feb 28, 2025

Should fix issues with Numpy 2.0

Close #281

def get_intensities(self) -> NDArray[np.float64]:
tmp = self._get_spectrum_raw()
arr = struct.unpack("<" + "H" * self._spectrum_length, tmp) # type: ignore
return numpy.array(arr, dtype=numpy.float_)
Copy link
Owner

Choose a reason for hiding this comment

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

Note to self: that's the relevant one-line fix.

@ap-- ap-- merged commit 770a9c7 into ap--:main Mar 27, 2025
9 checks passed
@ap--
Copy link
Owner

ap-- commented Mar 27, 2025

Thank you for your contribution @12buntu ❤️

I'll release a new version in the next days.

@ajoubertza
Copy link

I'll release a new version in the next days.

Hi @ap--. We ran into this numpy 2 problem this week. A new release would be great! Thanks.

@ap--
Copy link
Owner

ap-- commented Oct 26, 2025

@ajoubertza new release is out v2.11.0

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.

AttributeError: np.float_ was removed in the NumPy 2.0 release. Use np.float64 instead

3 participants