fix order in sim run
@@ -4,7 +4,6 @@ Defines the Sim class, Covasim's core class.
#%% Imports
import numpy as np
-import pylab as pl
import sciris as sc
from . import version as cvv
from . import utils as cvu
@@ -619,12 +618,10 @@ class Sim(cvb.BaseSim):
self.results['cum_infections'].values += self['pop_infected']*self.rescale_vec[0] # Include initially infected people
# Perform calculations on results
- self.compute_results(verbose=verbose)
-
- # Convert results to a odicts/objdict to allow e.g. sim.results.diagnoses
- self.results = sc.objdict(self.results)
- self.results_ready = True
+ self.results_ready = True # Set this first so self.summary() knows to print the results
self.initialized = False # To enable re-running
+ self.compute_results(verbose=verbose)
+ self.results = sc.objdict(self.results) # Convert results to a odicts/objdict to allow e.g. sim.results.diagnoses
return
