[Numpy-discussion] Stick intersection path algorithm

Josè Luis Mietta joseluismietta at yahoo.com.ar
Thu Sep 5 11:03:57 EDT 2013


Hi experts!

The array ([ 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?

What does means 'zero' (13 times) in the array?

Thans a lot!


José Luis


________________________________
 De: Daπid <davidmenhur at gmail.com>
Para: Discussion of Numerical Python <numpy-discussion at scipy.org> 
Enviado: jueves, 5 de septiembre de 2013 11:06
Asunto: Re: [Numpy-discussion] Stick intersection path algorithm
 




On 5 September 2013 13:14, Josè Luis Mietta <joseluismietta at yahoo.com.ar> wrote:

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)?
This is best asked in their mailing list. A possible way is:

np.bincount([len(i) for i in nx.connected_components(G)])

For example:
np.bincount([len(i) for i in nx.connected_components(nx.erdos_renyi_graph(100, 0.01))])
array([ 0, 39,  7,  3,  1,  1,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0, 0,  0,  1])
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion at scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130905/4d041509/attachment.html>


More information about the NumPy-Discussion mailing list