def adjacency_spectrum(G, weight='weight'):
 from scipy.linalg import eigvals
 return eigvals(nx.adjacency_matrix(G, weight=weight).todense())

def adjacency_spectrum ( G , weight = 'weight' ) : from scipy . linalg import eigvals return eigvals ( nx . adjacency_matrix ( G , weight = weight ) . todense ( ) )
return eigenvalues of the adjacency matrix of g .