Skip to content

Commit

Permalink
apply black
Browse files Browse the repository at this point in the history
  • Loading branch information
nomuramasahir0 committed Apr 2, 2024
1 parent 144e0fc commit 9be07e6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
16 changes: 10 additions & 6 deletions cmaes/_dxnesic.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,16 +317,20 @@ def tell(self, solutions: list[tuple[np.ndarray, float]]) -> None:
eta_sigma = (
self._eta_move_sigma
if norm_p_sigma >= self._chi_n
else self._eta_stag_sigma(lamb_feas)
if norm_p_sigma >= 0.1 * self._chi_n
else self._eta_conv_sigma(lamb_feas)
else (
self._eta_stag_sigma(lamb_feas)
if norm_p_sigma >= 0.1 * self._chi_n
else self._eta_conv_sigma(lamb_feas)
)
)
eta_B = (
self._eta_move_B(lamb_feas)
if norm_p_sigma >= self._chi_n
else self._eta_stag_B(lamb_feas)
if norm_p_sigma >= 0.1 * self._chi_n
else self._eta_conv_B(lamb_feas)
else (
self._eta_stag_B(lamb_feas)
if norm_p_sigma >= 0.1 * self._chi_n
else self._eta_conv_B(lamb_feas)
)
)

# natural gradient estimation in local coordinate
Expand Down
1 change: 1 addition & 0 deletions tools/cmaes_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
python3 tools/cmaes_visualizer.py --function himmelblau \
--restart-strategy ipop --frames 500 --interval 10 --pop-per-frame 6
"""

import argparse
import math

Expand Down
1 change: 1 addition & 0 deletions tools/ws_cmaes_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
Example:
python3 ws_cmaes_visualizer.py --function rot-ellipsoid
"""

import argparse
import math

Expand Down

0 comments on commit 9be07e6

Please sign in to comment.