igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Random sampling of nodes


From: Tamas Nepusz
Subject: Re: [igraph] Random sampling of nodes
Date: Thu, 19 Feb 2009 08:36:54 +0000

in R there is ?sample and I guess there is something similar in Python
as well.
In Python:

import random

k = 10
sampled_nodes = random.sample(range(graph.vcount()), k)

--
T.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]