title: Networkx's "generalized_laplacian()" not working anymore?
body: <p>This example (from Networkx's manual <a href="http://networkx.github.io/documentation/latest/examples/advanced/eigenvalues.html" rel="nofollow">http://networkx.github.io/documentation/latest/examples/advanced/eigenvalues.html</a>):</p>
  
  <pre><code>#!/usr/bin/env python
  """
  Create an G{n,m} random graph and compute the eigenvalues.
  
  Requires numpy or LinearAlgebra package from Numeric Python.
  
  Uses optional pylab plotting to produce histogram of eigenvalues.
  
  """
  __author__ = """Aric Hagberg (hagberg@lanl.gov)"""
  __credits__ = """"""
  #    Copyright (C) 2004-2006 by
  #    Aric Hagberg &lt;hagberg@lanl.gov&gt;
  #    Dan Schult &lt;dschult@colgate.edu&gt;
  #    Pieter Swart &lt;swart@lanl.gov&gt;
  #    All rights reserved.
  #    BSD license.
  
  from networkx import *
  try:
      import numpy.linalg
      eigenvalues=numpy.linalg.eigvals
  except ImportError:
      raise ImportError("numpy can not be imported.")
  
  try:
      from pylab import *
  except:
      pass
  
  n=1000 # 1000 nodes
  m=5000 # 5000 edges
  
  G=gnm_random_graph(n,m)
  
  L=generalized_laplacian(G)
  e=eigenvalues(L)
  print("Largest eigenvalue:", max(e))
  print("Smallest eigenvalue:", min(e))
  # plot with matplotlib if we have it
  # shows "semicircle" distribution of eigenvalues
  try:
      hist(e,bins=100) # histogram with 100 bins
      xlim(0,2)  # eigenvalues between 0 and 2
      show()
  except:
      pass
  </code></pre>
  
  <p>Raises the following error with networkx's latest version:</p>
  
  <pre><code>Traceback (most recent call last):
    File "Untitled 2.py", line 36, in &lt;module&gt;
      L=generalized_laplacian(G)
  NameError: name 'generalized_laplacian' is not defined
  </code></pre>
  
  <p>How should I go to make it work?</p>