starsimhub / starsim

Starsim disease modeling framework
http://starsim.org
MIT License
15 stars 9 forks source link

Address warnings #658

Closed cliffckerr closed 1 month ago

cliffckerr commented 1 month ago
test_diseases.py::test_multidisease
  /home/cliffk/idm/starsim/starsim/disease.py:228: RuntimeWarning: 
  Beta is defined as a number ({'randomnet': 0.1}); convert it to a rate to handle timestep conversions
    ss.warn(scalar_warn)

test_diseases.py::test_multidisease
  /home/cliffk/idm/starsim/starsim/disease.py:228: RuntimeWarning: 
  Beta is defined as a number ({'randomnet': 0.2}); convert it to a rate to handle timestep conversions
    ss.warn(scalar_warn)

test_demographics.py::test_module_adding
  /home/cliffk/idm/starsim/starsim/modules.py:186: RuntimeWarning: 
  Encountered exception when getting the current time in births: 'Births' object has no attribute 'timevec'
    ss.warn(f'Encountered exception when getting the current time in {self.name}: {E}')

test_demographics.py::test_module_adding
  /home/cliffk/idm/starsim/starsim/modules.py:186: RuntimeWarning: 
  Encountered exception when getting the current time in deaths: 'Deaths' object has no attribute 'timevec'
    ss.warn(f'Encountered exception when getting the current time in {self.name}: {E}')

test_networks.py::test_erdosrenyi
test_networks.py::test_erdosrenyi
  /software/anaconda3/lib/python3.11/site-packages/scipy/stats/_stats_py.py:8064: RuntimeWarning: invalid value encountered in divide
    terms = (f_obs_float - f_exp)**2 / f_exp

test_interventions.py::test_sir_vaccine_all_or_nothing
test_interventions.py::test_sir_vaccine_leaky
  /home/cliffk/idm/starsim/starsim/timepars.py:292: RuntimeWarning: invalid value encountered in log
    rate = -np.log(1 - self.value)
cliffckerr commented 1 month ago

Closed by #673