From 7ae867d71a88cc8748c7b977b75e11eaed9bfa23 Mon Sep 17 00:00:00 2001 From: sblunt Date: Sat, 29 Dec 2018 13:56:46 -0500 Subject: [PATCH] Update equality statement in checking for negative numbers <= --> <, as per @henry-ngo 's suggestion --- orbitize/priors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orbitize/priors.py b/orbitize/priors.py index 648fc9aa..6288ca90 100644 --- a/orbitize/priors.py +++ b/orbitize/priors.py @@ -73,7 +73,7 @@ def draw_samples(self, num_samples): while bad != 0: - bad_samples = np.where(samples <= 0)[0] + bad_samples = np.where(samples < 0)[0] bad = len(bad_samples) samples[bad_samples] = np.random.normal( @@ -101,7 +101,7 @@ def compute_lnprob(self, element_array): if self.no_negatives: - bad_samples = np.where(element_array <= 0)[0] + bad_samples = np.where(element_array < 0)[0] lnprob[bad_samples] = -np.inf return lnprob