From 414986e4b51161aa3fbbd5e10433855d2934683c Mon Sep 17 00:00:00 2001 From: Matthew Pitkin <matthew.pitkin@ligo.org> Date: Mon, 1 Jun 2020 17:02:00 +0100 Subject: [PATCH] base.py: change Prior __eq__ method to ignore least_recently_sampled values --- bilby/core/prior/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bilby/core/prior/base.py b/bilby/core/prior/base.py index db5880da1..802d5f6f1 100644 --- a/bilby/core/prior/base.py +++ b/bilby/core/prior/base.py @@ -68,6 +68,9 @@ class Prior(object): if sorted(self.__dict__.keys()) != sorted(other.__dict__.keys()): return False for key in self.__dict__: + if key == "least_recently_sampled": + # ignore sample drawn from prior in comparison + continue if type(self.__dict__[key]) is np.ndarray: if not np.array_equal(self.__dict__[key], other.__dict__[key]): return False -- GitLab