From 7777c1363946220d6dfb8d15e88b0064ab54fa2f Mon Sep 17 00:00:00 2001 From: joezuntz Date: Thu, 20 Jun 2024 14:39:56 +0100 Subject: [PATCH 1/3] Trim blobs in Sampler.posterior If trim_importance weights is set in Sampler.posterior then the blobs are not currently trimmed, leading to them being a different size and misaligned with the samples. --- pocomc/sampler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pocomc/sampler.py b/pocomc/sampler.py index 0190af3..1611bde 100644 --- a/pocomc/sampler.py +++ b/pocomc/sampler.py @@ -947,6 +947,8 @@ def posterior(self, resample=False, return_blobs=False, trim_importance_weights= logl = logl[idx] logp = logp[idx] logw = logw[idx] + if return_blobs: + blobs = blobs[idx] if resample: if self.resample == 'mult': From dbd8c656873e554893db05218d4baf074d3558fe Mon Sep 17 00:00:00 2001 From: Minas Karamanis Date: Thu, 20 Jun 2024 06:47:38 -0700 Subject: [PATCH 2/3] Update _version.py --- pocomc/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pocomc/_version.py b/pocomc/_version.py index 6654167..2be6f8b 100644 --- a/pocomc/_version.py +++ b/pocomc/_version.py @@ -1 +1 @@ -version = "1.2.1" \ No newline at end of file +version = "1.2.2" From a7a32eed4f7691391d44fb2ccb330260d8826ba2 Mon Sep 17 00:00:00 2001 From: Minas Karamanis Date: Thu, 20 Jun 2024 06:48:31 -0700 Subject: [PATCH 3/3] Update index.rst --- docs/source/index.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/index.rst b/docs/source/index.rst index ebfc352..f65cfd1 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -114,6 +114,10 @@ Copyright 2022-2024 Minas Karamanis and contributors. Changelog ========= +**1.2.2 (20/06/24)** + +- Fixed bug in ``posterior`` method related to blobs. + **1.2.1 (14/06/24)** - Added support for log-likelihoods that return ``-np.inf`` inside the prior volume.