Numpy >= 2.0 not supported
It seems that numpy >= 2.0 is not supported.
It may be difficult to adapt the code to numpy 2.0. Could it be possible to add numpy<2.0 in the requirements ?
I am also running into a problem where I get incompatability issues when installing sklearn_extra in a fresh environment.
To give a reproducible method for this incompatability
- Install a fresh virtual environment with python 3.10
-
pip install scikit-learn-extra - run python file
import sklearn_extra
This results in the following error:
File "sklearn_extra\utils\_cyfht.pyx", line 1, in init sklearn_extra.utils._cyfht ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
Hi @Niels-c-Scholten ,
I reproduced the error with the 3 steps indicated. I was able to bypass this error by downgrading numpy. In your venv you can remove numpy and then execute depending on your dependencies management tool:
- If you are using
uv:uv add [email protected] - If you are using
poetry:poetry add [email protected]
While this isn't a long-term fix for the package, it should unblock you and allow you to use scikit-learn-extra immediately. I hope this helps!