#NEWLINE# def test_degree_mixing_matrix_undirected( self ) : #NEWLINE# #INDENT# a_result = np . array ( [ [ 0 , 0 , 0 ] , [ 0 , 0 , 2 ] , [ 0 , 2 , 2 ] ] ) #NEWLINE# a = nx . degree_mixing_matrix ( self . P4 , normalized = False ) #NEWLINE# npt . assert_equal ( a , a_result ) #NEWLINE# a = nx . degree_mixing_matrix ( self . P4 ) #NEWLINE# npt . assert_equal ( a , ( a_result / float ( a_result . sum ( ) ) ) )