sknetwork-team / scikit-network

Graph Algorithms
Other
602 stars 67 forks source link

umpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObjec #527

Closed fbarfi closed 2 years ago

fbarfi commented 2 years ago

Description

Tried to import

from sknetwork.visualization import svg_graph, svg_digraph, svg_bigraph
from sknetwork.topology import CoreDecomposition
from sknetwork.topology import Triangles, Cliques
from sknetwork.classification import KNN
from sknetwork.embedding import GSVD
ValueError                                Traceback (most recent call last)
Input In [48], in <cell line: 3>()
      1 from IPython.display import SVG
      2 from scipy import sparse
----> 3 from sknetwork.visualization import svg_graph, svg_digraph, svg_bigraph
      4 from sknetwork.topology import CoreDecomposition
      5 from sknetwork.topology import Triangles, Cliques

File /opt/homebrew/Caskroom/miniforge/base/lib/python3.10/site-packages/sknetwork/__init__.py:9, in <module>
      6 __email__ = "bonald@enst.fr"
      7 __version__ = '0.26.0'
----> 9 import sknetwork.topology
     10 import sknetwork.path
     11 import sknetwork.classification

File /opt/homebrew/Caskroom/miniforge/base/lib/python3.10/site-packages/sknetwork/topology/__init__.py:2, in <module>
      1 """Module on topology."""
----> 2 from sknetwork.topology.kcliques import Cliques
      3 from sknetwork.topology.kcore import CoreDecomposition
      4 from sknetwork.topology.triangles import Triangles

File sknetwork/topology/kcliques.pyx:1, in init sknetwork.topology.kcliques()

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
fbarfi commented 2 years ago

forgot to mentionL

scikit-network 0.26.0

simondelarue commented 2 years ago

Hi fbarfi,

From this closed issue, it seems that it comes from a numpy version problem.
Have you tried upgrading numpy library, for example to version 1.22.3 ?

fbarfi commented 2 years ago

Thanks for the suggestion simondelarue. I did that and it works. However, it then affects other packages I am using in conjunction which require numpy version <1.22.

tbonald commented 2 years ago

Well, this is not an issue of scikit-network, then :-) Thanks for the feedback.

fbarfi commented 2 years ago

you are welcome.