code: def eigenvector_centrality_und(CIJ):
      '''
      Eigenector centrality is a self-referential measure of centrality:
      nodes have high eigenvector centrality if they connect to other nodes
      that have high eigenvector centrality. The eigenvector centrality of
      node i is equivalent to the ith element in the eigenvector
      corresponding to the largest eigenvalue of the adjacency matrix.
  
      Parameters
      ----------
      CIJ : NxN np.ndarray
          binary/weighted undirected adjacency matrix
  
      v : Nx1 np.ndarray
          eigenvector associated with the largest eigenvalue of the matrix
      '''
      from scipy import linalg
  
      n = len(CIJ)
      vals, vecs = linalg.eig(CIJ)
      i = np.argmax(vals)
      return np.abs(vecs[:, i]f eigenvector_centrality_und(CIJ):
      '''
      Eigenector centrality is a self-referential measure of centrality:
      nodes have high eigenvector centrality if they connect to other nodes
      that have high eigenvector centrality. The eigenvector centrality of
      node i is equivalent to the ith element in the eigenvector
      corresponding to the largest eigenvalue of the adjacency matrix.
  
      Parameters
      ----------
      CIJ : NxN np.ndarray
          binary/weighted undirected adjacency matrix
  
      v : Nx1 np.ndarray
          eigenvector associated with the largest eigenvalue of the matrix
      '''
      from scipy import linalg
  
      n = len(CIJ)
      vals, vecs = linalg.eig(CIJ)
      i = np.argmax(vals)
      return np.abs(vecs[:, i])
docs: Eigenector centrality is a self-referential measure of centrality:
      nodes have high eigenvector centrality if they connect to other nodes
      that have high eigenvector centrality. The eigenvector centrality of
      node i is equivalent to the ith element in the eigenvector
      corresponding to the largest eigenvalue of the adjacency matrix.
  
      Parameters
      ----------
      CIJ : NxN np.ndarray
          binary/weighted undirected adjacency matrix
  
      v : Nx1 np.ndarray
          eigenvector associated with the largest eigenvalue of the matrix