title: AttributeError when trying to do a block partition with graph-tool
body: <p>I am getting this error:</p>
  
  <pre><code>AttributeError: 'list' object has no attribute 'clear'
  </code></pre>
  
  <p>when trying to execute the example at <a href="http://graph-tool.skewed.de/static/doc/community.html" rel="nofollow noreferrer">this page</a></p>
  
  <p><img src="https://i.stack.imgur.com/GAfcS.png" alt="block partition example"></p>
  
  <p>The example is:</p>
  
  <pre><code>&gt;&gt;&gt; g = gt.collection.data["power"]
  &gt;&gt;&gt; bstack, mdl = gt.minimize_nested_blockmodel_dl(g, deg_corr=True)
  &gt;&gt;&gt; t = gt.get_hierarchy_tree(bstack)[0]
  &gt;&gt;&gt; tpos = pos = gt.radial_tree_layout(t, t.vertex(t.num_vertices() - 1), weighted=True)
  &gt;&gt;&gt; cts = gt.get_hierarchy_control_points(g, t, tpos)
  &gt;&gt;&gt; pos = g.own_property(tpos)
  &gt;&gt;&gt; b = bstack[0].vp["b"]
  &gt;&gt;&gt; gt.graph_draw(g, pos=pos, vertex_fill_color=b, vertex_shape=b, edge_control_points=cts,
  ...               edge_color=[0, 0, 0, 0.3], vertex_anchor=0, output="power_nested_mdl.pdf")
  &lt;...&gt;
  </code></pre>
  
  <p>and it gives me the exception when running the line:</p>
  
  <pre><code>&gt;&gt;&gt; bstack, mdl = gt.minimize_nested_blockmodel_dl(g, deg_corr=True)
  </code></pre>
  
  <p>Any clue?</p>
  
  <p>Thanks</p>