Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

adjacency_spectrum

adjacency_spectrum(G, weight='weight')[source]

Return eigenvalues of the adjacency matrix of G.

Parameters:
  • G (graph) – A NetworkX graph
  • weight (string or None, optional (default='weight')) – The edge data key used to compute each value in the matrix. If None, then each edge has weight 1.
Returns:

evals – Eigenvalues

Return type:

NumPy array

Notes

For MultiGraph/MultiDiGraph, the edges weights are summed. See to_numpy_matrix for other options.

See also

adjacency_matrix()