#NEWLINE# def test_numpy_pagerank( self ) : #NEWLINE# #INDENT# G = self . G #NEWLINE# p = networkx . pagerank_numpy ( G , alpha = 0.9 ) #NEWLINE# for n in G : #NEWLINE# #INDENT# assert_almost_equal ( p [ n ] , n . pagerank [ n ] , places = 4 ) #NEWLINE# #UNINDENT# personalize = dict ( ( ( n , random . random ( ) ) for n in G ) ) #NEWLINE# p = networkx . pagerank_numpy ( G , alpha = 0.9 , personalization = personalize )