'Modularity matrix'

def test_modularity(self):

    B = numpy.matrix([[(-1.125), 0.25, 0.25, 0.625, 0.0], [0.25, (-0.5), 0.5, (-0.25), 0.0], [0.25, 0.5, (-0.5), (-0.25), 0.0], [0.625, (-0.25), (-0.25), (-0.125), 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]])
    permutation = [4, 0, 1, 2, 3]
    assert_equal(nx.modularity_matrix(self.G), B)
    assert_equal(nx.modularity_matrix(self.G, nodelist=permutation), B[numpy.ix_(permutation, permutation)])
