scikit-learn-extra icon indicating copy to clipboard operation
scikit-learn-extra copied to clipboard

Numpy >= 2.0 not supported

Open RobinsonBeaucour opened this issue 1 year ago • 2 comments

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 ?

RobinsonBeaucour avatar Dec 07 '24 15:12 RobinsonBeaucour

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

  1. Install a fresh virtual environment with python 3.10
  2. pip install scikit-learn-extra
  3. 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

Niels-c-Scholten avatar Jun 25 '25 09:06 Niels-c-Scholten

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:

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!

marasendra avatar Aug 08 '25 13:08 marasendra