Skip to content

Commit

Permalink
add assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
nomuramasahir0 committed Apr 2, 2024
1 parent 9be07e6 commit 962d4cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmaes/_cma.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,10 @@ def tell(self, solutions: list[tuple[np.ndarray, float]]) -> None:

# Learning rate adaptation: https://arxiv.org/abs/2304.03473
if self._lr_adapt:
assert isinstance(old_mean, np.ndarray)
assert isinstance(old_sigma, (int, float))
assert isinstance(old_Sigma, np.ndarray)
assert isinstance(old_invsqrtC, np.ndarray)
self._lr_adaptation(old_mean, old_sigma, old_Sigma, old_invsqrtC)

def _lr_adaptation(
Expand Down

0 comments on commit 962d4cb

Please sign in to comment.