[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Help required - How to perform matrix multiplication in igr

From: Pranay Vasani
Subject: Re: [igraph] Help required - How to perform matrix multiplication in igraph-python
Date: Thu, 14 Jan 2016 09:15:22 +0530

I have created a bipartite_projection of my graph as shown below.
when it try to write the graph in graphml format i get below error.

pr1,pr2 = g.bipartite_projection("type")
f = io.open("pr2.graphml", 'w',encoding='utf8')
TypeError                                 Traceback (most recent call last)
<ipython-input-67-518ec61bc6d2> in <module>()
----> 1 pr2.write_graphml(f)

TypeError: string or file handle expected

What am i doing wrong here?

On Wed, Jan 13, 2016 at 5:08 PM, Pranay Vasani <address@hidden> wrote:
Thanks a ton. After i replied to you i could figure this out.

On Wed, Jan 13, 2016 at 4:48 PM, Tamas Nepusz <address@hidden> wrote:
> bipartite_projection() also produced a matrix with values 0 and 1. May be i
> am missing something here.
Look at the "weight" edge attribute of the bipartite projection - it
should contain exactly the information that you need. Or, use
g.get_adjacency(attribute="weight") - but that one will return a dense
matrix so it won't work for large graphs.


igraph-help mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]