Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

networkx - calculate degree per each node

# Degree
degrees = [val for (node, val) in G.degree()]

# Sorted degree
degrees = [val for (node, val) in sorted(G.degree(), key=lambda pair: pair[0])]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #networkx #calculate #degree #node
ADD COMMENT
Topic
Name
1+6 =