diff --git a/elfi/methods/inference/samplers.py b/elfi/methods/inference/samplers.py index 9ef952e1..22c0af96 100644 --- a/elfi/methods/inference/samplers.py +++ b/elfi/methods/inference/samplers.py @@ -824,7 +824,7 @@ def _resolve_sample(self, backwards_index): weights = sample.weights samples = sample.samples_array sample_sigma = np.sqrt(np.diag(sample.cov)) - sigma_max = np.max(sample_sigma) + sigma_max = np.min(sample_sigma) sample_data = dict(samples=samples, weights=weights, sigma_max=sigma_max) return sample_data @@ -834,7 +834,7 @@ def _densityratio_initial_sample(self): samples = self._prior.rvs(size=n_samples, random_state=self._round_random_state) weights = np.ones(n_samples) sample_cov = np.atleast_2d(np.cov(samples.reshape(n_samples, -1), rowvar=False)) - sigma_max = np.max(np.sqrt(np.diag(sample_cov))) + sigma_max = np.min(np.sqrt(np.diag(sample_cov))) return dict(samples=samples, weights=weights, sigma_max=sigma_max)