title: how to solve: AttributeError: 'generator' object has no attribute 'ndim'
body: <p>I have a problem with this code:</p>
  
  <pre><code>def get_lap(cmap):
      return scipy.sparse.csc_matrix(csgraph.laplacian(cmap, normed=False))
  
  def fromcmaptocoords(C): 
      L = get_lap(C)
      eigw, eigv = LA.eigh(L.todense())
      vecs = eigv[:,1:3]
      guess_coords = pd.DataFrame(data=vecs, columns=["x", "y"])
      return guess_coords
  </code></pre>
  
  <p>I get the following error: </p>
  
  <pre><code>File "/Users/Sofia/Desktop/2d.py", line 102, in fromcmaptocoords
  L = get_lap(C)
  
  File "/Users/Sofia/Desktop/2d.py", line 96, in get_lap
   return scipy.sparse.csc_matrix(csgraph.laplacian(cmap, normed=False))
  
  File "/anaconda3/lib/python3.6/site-packages/scipy/sparse/csgraph/_laplacian.py",
  line 69, in laplacian if csgraph.ndim != 2 or csgraph.shape[0] != csgraph.shape[1]:
  
  AttributeError: 'generator' object has no attribute 'ndim'
  </code></pre>
  
  <p>Could you help me with this? I don't know what I need to change
  Thanks </p>