Closed j-bowhay closed 11 months ago
I have corrected this on the github repository. If you use pip, it will still be broken. You will need to replace simulation.py in your repository with the version currently on github. This error in your post shows where that file is: ~/development/mathmod/venv/lib/python3.11/site-packages/EoN/simulation.py
There's a sequence of tests that I run before I update anything for pip, but I now on a windows machine instead of a mac so it will take time to make sure everything is in place. On top of that, I'm travelling for a conference. It will take time for me to run those. I'll leave this issue open until it's updated on pip.
I'm not quite sure if it's a networkx or python update that broke this, but it looks like it's been broken for a while now. So thank you for the report.
Alternatively, for now you can select a random node from G
and give it as initial_infecteds
:
initial_infecteds = [random.choice(list(G))]
t, S, I = EoN.fast_SIS(G, tau, gamma, tmax = 10, initial_infecteds=initial_infecteds)
Thanks for the quick response!
Docs suggest this should chose a random node but instead