On 5 September 2013 13:14, Josè Luis Mietta <joseluismie...@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@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion