def test_calculate_degree_matrix_2(self):
        
#         0--3
#         |\  \ 
#         5 4  2
#         
#         X = np.array(
#              [[0.0, 0.0, 1.0, 1.0, 1.0],
#               [0.0, 0.0, 1.0, 0.0, 0.0],
#               [1.0, 1.0, 0.0, 0.0, 0.0],
#               [1.0, 0.0, 0.0, 0.0, 0.0],
#               [1.0, 0.0, 0.0, 0.0, 0.0]]
#               )
        data = [0.0, 1.0, 1.0, 1.0,
                     1.0, 0.0, 0.0,
                          0.0, 0.0,
                               0.0]
        
        W = CondensedMatrix(data)
        
        self.assertListEqual([ 3., 1., 2., 1., 1.], SpectralTools.calculate_degree_matrix(W))
Test provided by Nancy-Sarah Yacovzada.
dataset/ETHPy150Open victor-gil-sepulveda/pyProCT/pyproct/clustering/algorithms/spectral/test/TestSpectralTools.py/Test.test_calculate_degree_matrix_2