'Eigenvector centrality: K5'

def test_K5(self):

    G = nx.complete_graph(5)
    b = nx.eigenvector_centrality(G)
    v = math.sqrt((1 / 5.0))
    b_answer = dict.fromkeys(G, v)
    for n in sorted(G):
        assert_almost_equal(b[n], b_answer[n])
    nstart = dict([(n, 1) for n in G])
    b = nx.eigenvector_centrality(G, nstart=nstart)
    for n in sorted(G):
        assert_almost_equal(b[n], b_answer[n])
    b = nx.eigenvector_centrality_numpy(G)
    for n in sorted(G):
        assert_almost_equal(b[n], b_answer[n], places=3)
