diff options
| author | jeanpouget-abadie <jean.pougetabadie@gmail.com> | 2015-11-28 15:14:52 -0500 |
|---|---|---|
| committer | jeanpouget-abadie <jean.pougetabadie@gmail.com> | 2015-11-28 15:14:52 -0500 |
| commit | 041aa021657a3c290952b222e3141449638bad19 (patch) | |
| tree | 087dbbbfc1f08d207e6a443fc91e900b3a588d19 /simulation/main.py | |
| parent | e0152021025e07788e5ef928af6c9160c98c5452 (diff) | |
| download | cascades-041aa021657a3c290952b222e3141449638bad19.tar.gz | |
switch to python 3 + blocks version of MLE implemented
Diffstat (limited to 'simulation/main.py')
| -rw-r--r-- | simulation/main.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/simulation/main.py b/simulation/main.py index decdf8f..1c0b3e8 100644 --- a/simulation/main.py +++ b/simulation/main.py @@ -7,6 +7,7 @@ from scipy.optimize import minimize import matplotlib.pyplot as plt import seaborn from random import random, randint +from six.moves import range seaborn.set_style("white") @@ -39,7 +40,7 @@ def uniform_source(graph, *args, **kwargs): def simulate_cascades(n, graph, source=uniform_source): - for t in xrange(n): + for t in range(n): x0 = source(graph, t) yield simulate_cascade(x0, graph) |
