You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The initial issue I got was with gridspec in the demo file, a few tweaks and importing matplotlib.gridspec resolved it.
The second issue was with initialize_population in population.py, it kept complaining about Config.pop_size, again importing config in demo and passing Config as the first param seemed to resolve the issue.
Now it's complaining about destinations in infection.py. if len(destinations) == 0: TypeError: object of type 'int' has no len()
After a bit of scooby dooing, I think I found a discrepancy between the infect function in demo and what it should be taking.
demo_COVID.py -- disregard the position of frame and the introduction of c
population = infect(population, c, frame, infection_range, infection_chance, healthcare_capacity, verbose)
infection.py def infect(population, Config, frame, send_to_location=False, location_bounds=[], destinations=[], location_no=1, location_odds=1.0):
Am I right to assume that this discrepancy is the main cause of the issue?
Now obviously I am doing something extremely wrong here, I would very much appreciate any feedback.
Cheers,
The text was updated successfully, but these errors were encountered:
Paul,
Wonderful job.
But I can't get the example to work.
The initial issue I got was with gridspec in the demo file, a few tweaks and importing matplotlib.gridspec resolved it.
The second issue was with
initialize_population
inpopulation.py
, it kept complaining aboutConfig.pop_size
, again importing config in demo and passing Config as the first param seemed to resolve the issue.Now it's complaining about destinations in infection.py.
if len(destinations) == 0: TypeError: object of type 'int' has no len()
After a bit of scooby dooing, I think I found a discrepancy between the infect function in demo and what it should be taking.
demo_COVID.py -- disregard the position of
frame
and the introduction ofc
population = infect(population, c, frame, infection_range, infection_chance, healthcare_capacity, verbose)
infection.py
def infect(population, Config, frame, send_to_location=False, location_bounds=[], destinations=[], location_no=1, location_odds=1.0):
Am I right to assume that this discrepancy is the main cause of the issue?
Now obviously I am doing something extremely wrong here, I would very much appreciate any feedback.
Cheers,
The text was updated successfully, but these errors were encountered: