Category : igraph

I wrote this code to convert data in .gml format but I got this error. what should I do? TypeError: descriptor ‘write_gml’ for ‘igraph._igraph.GraphBase’ objects doesn’t apply to a ‘str’ object code: import igraph as ig import pandas as pd a = pd.DataFrame(Matrix, index=tags, columns=tags) # # Get the values as np.array, it’s more convenenient. ..

Read more

I wrote code below to show graph with igraph package, But I don’t know How can I export igraph result in csv file in python? and my another question is how can I add label? import igraph as ig import pandas as pd g=ig.Graph.TupleList(df.itertuples(index=False),directed=True) ig.plot(g, target=’graph.png’, vertex_size=10, bbox=(0, 0, 500, 500)) Source: Python..

Read more

I want to use igraph library in python to draw graph. How can I show the graph? import igraph import pandas as pd node_names = tags a = pd.DataFrame(tag_df, index=node_names, columns=node_names) # Get the values as np.array, it’s more convenenient. A = a.values # Create graph, A.astype(bool).tolist() or (A / A).tolist() can also be used. ..

Read more

I’m trying to do some image processing on my android stuio app with python. I’m using Chaquopy and the python script requires igraph import. But when I’m trying to install python-igraph in build.gradle(app): plugins { id ‘com.android.application’ id ‘com.chaquo.python’ } android { compileSdk 30 defaultConfig { applicationId "com.example.chaq" minSdk 21 targetSdk 30 versionCode 1 versionName ..

Read more

I am trying to install the igraph, using the command bellow: pip install python-igraph but an error occurred: Collecting python-igraph Using cached https://files.pythonhosted.org/packages/8c/96/0c027d017a334d22237ef29263d314724bd0f345e8ff122e4133c85cec91/python-igraph-0.9.6.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-kEbNVg/python-igraph/setup.py", line 465 raise RuntimeError(f"Failed to clean {folder} with git") ^ SyntaxError: invalid ..

Read more