[in :]

    nx.closeness_centrality(G)

    [out:]

    {1: 0.5,
     2: 0.6153846153846154,
     3: 0.5333333333333333,
     4: 0.47058823529411764,
     5: 0.47058823529411764,
     6: 0.34782608695652173,
     7: 0.7272727272727273,
     8: 0.4,
     9: 0.4}

    [in :]

    centrality = nx.eigenvector_centrality(G)
    sorted((v, '{:0.2f}'.format(c)) for v, c in centrality.items())

    [out:]

    [(1, '0.24'),
     (2, '0.45'),
     (3, '0.36'),
     (4, '0.32'),
     (5, '0.32'),
     (6, '0.08'),
     (7, '0.59'),
     (8, '0.16'),
     (9, '0.16')]
    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.