diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2015-10-16 16:52:17 -0400 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2015-10-16 16:52:17 -0400 |
| commit | fd4b442d8e429c97f2d72929f5c211f5f5e4d2b3 (patch) | |
| tree | 6a30e5c87bd029728e50811e225f2345df26166c /simulation | |
| parent | 114c6a44edb87348574cdf747cd21ab3c328c4d8 (diff) | |
| download | cascades-fd4b442d8e429c97f2d72929f5c211f5f5e4d2b3.tar.gz | |
Fix source selection + cosmetic improvement for Jean
Diffstat (limited to 'simulation')
| -rw-r--r-- | simulation/main.py | 4 |
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) |
