TangleSpace / hydralit_components

A package of custom components for Streamlit and Hydralit. Can be used directly or in combination with the Hydralit package.
Apache License 2.0
185 stars 21 forks source link

numpy 2.0.0 lib dependency error #32

Open Lucandia opened 3 months ago

Lucandia commented 3 months ago

The script hydralit_components/Loaders/loaders.py contains a numpy dependency: from numpy.lib.arraysetops import isin. When I use hydralit components with the new version of Numpy (2.0.0), I get a dependency error (arraysetops is not found in numpy.lib). The numpy 2.0.0 migration guide states that:

Most of the functions available within np.lib are also present in the main namespace, which is their primary location. 
To make it unambiguous how to access each public function, np.lib is now empty and contains only a handful of specialized submodule [...].
If you get an AttributeError when accessing an attribute from np.lib you should try accessing it from the main np namespace then.

I suggest either indicating as a dependency the previous version of numpy (1.26) or trying to find the corresponding function of isin (maybe directly numpy.isin) in numpy 2.0 (also because there is only one script that requires it). Should I fork the repository, try and fix and submit a pull request?