diff --git a/augur/titer_model.py b/augur/titer_model.py index 92b213be0..734cc2675 100644 --- a/augur/titer_model.py +++ b/augur/titer_model.py @@ -226,7 +226,7 @@ def __init__(self, titers, **kwargs): else: self.titers = titers strain_counts = type(self).count_strains(titers) - self.strains = strain_counts.keys() + self.strains = list(strain_counts.keys()) def read_titers(self, fname): self.titer_fname = fname @@ -504,7 +504,7 @@ def validate(self, plot=False, cutoff=0.0, validation_set = None, fname=None): pred_titer = self.predict_titer(key[0], key[1], cutoff=cutoff) validation[key] = (val, pred_titer) - validation_array = np.array(validation.values()) + validation_array = np.array(list(validation.values())) actual = validation_array[:,0] predicted = validation_array[:,1] @@ -517,7 +517,7 @@ def validate(self, plot=False, cutoff=0.0, validation_set = None, fname=None): 'rms_error': np.sqrt(np.mean((actual-predicted)**2)), } pprint(model_performance) - model_performance['values'] = validation.values() + model_performance['values'] = list(validation.values()) self.validation = model_performance