Adjancymatrix graphcreation
12 Mar
2014
12 Mar
'14
4:28 p.m.
Hey folks, Is there an efficient way to create a graph out of a sparse adjancy matrix? Otherwise my idea is rather to use np.nonzero and iterate over it all, but it didnt naive to me. best, vsilv
13 Mar
13 Mar
10:36 a.m.
On 03/12/2014 05:28 PM, v k wrote:
Hey folks,
Is there an efficient way to create a graph out of a sparse adjancy matrix? Otherwise my idea is rather to use np.nonzero and iterate over it all, but it didnt naive to me.
There is not built-in function for this. All you need to do is to iterate over the nonzero entries, and call Graph.add_edge(). Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
4297
Age (days ago)
4298
Last active (days ago)
1 comments
2 participants
participants (2)
-
Tiago de Paula Peixoto -
v k