Hi,
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')
pr2.write_graphml(f)
---------------------------------------------------------------------------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?
Thanks
Pranay
On Wed, Jan 13, 2016 at 5:08 PM, Pranay Vasani <[email protected]>
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 <[email protected]> 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.
>>
>> T.
>>
>> _______________________________________________
>> igraph-help mailing list
>> [email protected]
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>
>
>
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help