diff --git a/rocketpy/simulation/monte_carlo.py b/rocketpy/simulation/monte_carlo.py index 7f6689599..16b47c64c 100644 --- a/rocketpy/simulation/monte_carlo.py +++ b/rocketpy/simulation/monte_carlo.py @@ -722,12 +722,17 @@ def set_processed_results(self): try: mean = np.mean(values) stdev = np.std(values) + self.processed_results[result] = (mean, stdev) pi_low = np.quantile(values, 0.025) pi_high = np.quantile(values, 0.975) median = np.median(values) - self.processed_results[result] = (mean, median, stdev, pi_low, pi_high) except TypeError: - self.processed_results[result] = (None, None, None, None, None) + mean = None + stdev = None + pi_low = None + pi_high = None + median = None + self.processed_results[result] = (mean, median, stdev, pi_low, pi_high) # Import methods