Skip to content

Commit

Permalink
Update equality statement in checking for negative numbers
Browse files Browse the repository at this point in the history
<= --> <, as per @henry-ngo 's suggestion
  • Loading branch information
sblunt committed Dec 29, 2018
1 parent 20c6688 commit 7ae867d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions orbitize/priors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7ae867d

Please sign in to comment.