Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with numy 2.0 ValueError: numpy.dtype size changed #642

Closed
RogerHYang opened this issue Jun 17, 2024 · 5 comments
Closed

issue with numy 2.0 ValueError: numpy.dtype size changed #642

RogerHYang opened this issue Jun 17, 2024 · 5 comments

Comments

@RogerHYang
Copy link

screenshot below shows the error in Colab

%pip install numpy==2.0 hdbscan scikit-learn==1.5.0

from hdbscan import HDBSCAN
Screenshot 2024-06-17 at 7 36 12 AM
@lmcinnes
Copy link
Collaborator

The numpy 2.0 release might mean you have to ensure cython gets run to rebuild C sources. Potentially this can be solved the --no-binary option in pip install, but I'm not entirely sure if this is exactly the issue.

@lmcinnes
Copy link
Collaborator

It looks like numpy 2.0 is not going to play nice with cython and hdbscan here. Figuring out how to make it all work will take some time. In the meantime I've pinned the numpy version as <2 for a new hdbscan release so installing from PyPI (soon) will object to having hdbscan 0.8.37 and numpy 2.0. For other workarounds I would suggest looking to fast_hdbcan which should work with numpy 2.0 right now.

@seberg
Copy link
Contributor

seberg commented Jul 3, 2024

@lmcinnes there should be nothing required except uploading no wheels. I have opened #644

@seberg
Copy link
Contributor

seberg commented Jul 3, 2024

Sorry, turns out there were some minor code tweaks needed. And there is another issue, but I am not sure what it is, since it doesn't seem to be related to NumPy itself.

@jakirkham
Copy link

Thanks Sebastian and Leland! 🙏

Is there more still needed here?

Or do we just need a release and packages?

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

No branches or pull requests

4 participants