Skip to content

Commit

Permalink
avoid empty bootstraps
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesBuchner committed Jun 1, 2021
1 parent aa9b71b commit 77393bf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ultranest/mlfriends.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,8 @@ class MLFriends(object):
idx = rng.randint(N, size=N)
selected[:] = False
selected[idx] = True
if selected.all() or not selected.any():
continue

# compute distances from a to b
maxd = max(maxd, compute_maxradiussq(
Expand Down

0 comments on commit 77393bf

Please sign in to comment.