Skip to content

Commit

Permalink
Merge pull request #214 from eukaryo/fix_ctpe-assert
Browse files Browse the repository at this point in the history
Fix assertion in c-TPE
  • Loading branch information
nabenabe0928 authored Dec 13, 2024
2 parents 9a58a5d + 9a84028 commit 2512d76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package/samplers/ctpe/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __call__(self, x: int) -> int:
elif self._strategy == "sqrt":
n = int(np.ceil(self._beta * np.sqrt(x)))
else:
assert "Should not reach."
assert False, "Should not reach."

return min(n, 25)

Expand All @@ -45,4 +45,4 @@ def __call__(self, x: int) -> np.ndarray:
weights[:-25] = 1e-12
return weights
else:
assert "Should not reach."
assert False, "Should not reach."

0 comments on commit 2512d76

Please sign in to comment.