aboutsummaryrefslogtreecommitdiffstats
path: root/simulation
diff options
context:
space:
mode:
Diffstat (limited to 'simulation')
-rw-r--r--simulation/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/simulation/main.py b/simulation/main.py
index 63c8c02..b7b3eaa 100644
--- a/simulation/main.py
+++ b/simulation/main.py
@@ -39,8 +39,8 @@ def simulate_cascade(x, graph):
def simulate_cascades(n, graph):
for _ in xrange(n):
- x = np.zeros(g.shape[0]).astype(bool)
- x[nr.random()] = True
+ x = np.zeros(g.shape[0], dtype=bool)
+ x[nr.randint(0, g.shape[0])] = True
yield simulate_cascade(x, graph)