#NEWLINE# def test_calculate_degree_matrix( self ) : #NEWLINE# #INDENT# W_data = numpy . array ( [ 4.0 , 6.0 , 7.0 ] ) #NEWLINE# expected_D = [ 10.0 , 11.0 , 13.0 ] #NEWLINE# D = SpectralTools . calculate_degree_matrix ( CondensedMatrix ( D ) ) #NEWLINE# numpy . testing . assert_almost_equal ( D , expected_D , 8 )