springer-math / Mathematics-of-Epidemics-on-Networks

Source code accompanying 'Mathematics of Epidemics on Networks' by Kiss, Miller, and Simon http://www.springer.com/us/book/9783319508047 . Documentation for the software package is at https://epidemicsonnetworks.readthedocs.io/en/latest/
MIT License
150 stars 61 forks source link

recovery_weight and compatibility with NetworkX 2.x #66

Closed jaowen closed 4 years ago

jaowen commented 4 years ago

Hello,

In the function _get_rate_functions_, I don't think the recovery_weight option is handled correctly if the user has a recent version of NetworkX. For compatibility, in line 124, G.node should be G.nodes.

joelmiller commented 4 years ago

The updated version on github (1.2rc1) should now fix this (the version installed by pip does not have this update)