'Laplacian eigenvalues'

def test_laplacian_spectrum(self):

    evals = numpy.array([0, 0, 1, 3, 4])
    e = sorted(nx.laplacian_spectrum(self.G))
    assert_almost_equal(e, evals)
    e = sorted(nx.laplacian_spectrum(self.WG, weight=None))
    assert_almost_equal(e, evals)
    e = sorted(nx.laplacian_spectrum(self.WG))
    assert_almost_equal(e, (0.5 * evals))
    e = sorted(nx.laplacian_spectrum(self.WG, weight='other'))
    assert_almost_equal(e, (0.3 * evals))
