'Katz centrality: P3'

def test_P3(self):

    alpha = 0.1
    G = nx.path_graph(3)
    b_answer = {0: 0.5598852584152165, 1: 0.6107839182711449, 2: 0.5598852584152162}
    b = nx.katz_centrality_numpy(G, alpha)
    for n in sorted(G):
        assert_almost_equal(b[n], b_answer[n], places=4)
