diff --git a/scilpy/utils/metrics_tools.py b/scilpy/utils/metrics_tools.py index 2aac75872..66860549d 100644 --- a/scilpy/utils/metrics_tools.py +++ b/scilpy/utils/metrics_tools.py @@ -157,7 +157,8 @@ def weighted_mean_std(weights, data): a tuple containing the mean and standard deviation of the data """ - masked_data = np.ma.masked_array(data, np.logical_or(np.isnan(a), np.isinf(a))) + masked_data = np.ma.masked_array(data, np.logical_or(np.isnan(data), + np.isinf(data))) mean = np.ma.average(masked_data, weights=weights) variance = np.ma.average((masked_data-mean)**2, weights=weights)