<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:10pt"><div><span>Hi experts!</span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span>The array </span>([ 0, 39, 7, 3, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1]) means that in the sistem (graph) are : 4 cluster of size 1, one cluster of size 3, one cluster of size 7 and one cluste of size 39?</div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: times new roman,new york,times,serif; background-color: transparent;
font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">What does means 'zero' (13 times) in the array?</div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">Thans a lot!<br></div><div><br>José Luis</div><br><div style="font-family: times new roman, new york, times, serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1"> <font face="Arial" size="2"> <b><span style="font-weight:bold;">De:</span></b> Daπid <davidmenhur@gmail.com><br> <b><span
style="font-weight: bold;">Para:</span></b> Discussion of Numerical Python <numpy-discussion@scipy.org> <br> <b><span style="font-weight: bold;">Enviado:</span></b> jueves, 5 de septiembre de 2013 11:06<br> <b><span style="font-weight: bold;">Asunto:</span></b> Re: [Numpy-discussion] Stick intersection path algorithm<br> </font> </div> <div class="y_msg_container"><br><div id="yiv6214797036"><div dir="ltr"><div class="yiv6214797036gmail_extra"><br><div class="yiv6214797036gmail_quote">On 5 September 2013 13:14, Josè Luis Mietta <span dir="ltr"><<a rel="nofollow" ymailto="mailto:joseluismietta@yahoo.com.ar" target="_blank" href="mailto:joseluismietta@yahoo.com.ar">joseluismietta@yahoo.com.ar</a>></span> wrote:<br>
<blockquote class="yiv6214797036gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex;">2. Using networkx or other tool: how can I obtain the 'clusters size' distribution (that is: number of clusters of size 'D', for all cluster-sizes)?</blockquote>
</div><br>This is best asked in their mailing list. A possible way is:</div><div class="yiv6214797036gmail_extra"><br></div><div class="yiv6214797036gmail_extra"><div class="yiv6214797036gmail_extra">np.bincount([len(i) for i in nx.connected_components(G)])</div>
<div><br></div><div>For example:</div></div><div class="yiv6214797036gmail_extra"><div class="yiv6214797036gmail_extra">np.bincount([len(i) for i in nx.connected_components(nx.erdos_renyi_graph(100, 0.01))])</div><div><div>array([ 0, 39, 7, 3, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1])</div>
</div></div></div></div><br>_______________________________________________<br>NumPy-Discussion mailing list<br><a ymailto="mailto:NumPy-Discussion@scipy.org" href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br><a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br><br><br></div> </div> </div> </div></body></html>