#NEWLINE# def test_calculate_adjacency_matrix( self ) : #NEWLINE# #INDENT# data = numpy . array ( [ 1.0 , 4.0 , 6.0 , 2.0 , 5.0 , 3.0 , 9.0 , 7.0 , 2.0 , 4.0 , 1.0 , 1.0 , 9.0 , 3.0 , 8.0 ] ) #NEWLINE# matrix = CondensedMatrix ( data ) #NEWLINE# expected_W = numpy . array ( [ 0.13537598 , 0.0 , 0.0 , 0.00033545 , 0.0 , 0.0 , 0.0 , 0.0 , 0.00033545 , 0.0 , 0.13537598 , 0.13537598 , 0.0 , 0.0 , 0.0 ] ) #NEWLINE# W = SpectralTools . calculate_fully_connected_adjacency_matrix ( data , sigma_sq = 0.5 ) #NEWLINE# numpy . testing . assert_almost_equal ( W . get_data ( ) , expected_W , 3 )