Skip to content

Commit

Permalink
Fix: Initialise wjreg before entering in the loop to be sure it will …
Browse files Browse the repository at this point in the history
…exists. (#348)
  • Loading branch information
maximejay authored Nov 20, 2024
1 parent 1d1483a commit effe281
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions smash/core/simulation/optimize/_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ def _get_lcurve_wjreg_best(

max_distance = 0.0
distance = np.zeros(shape=cost_arr.size)
wjreg=0.0

for i in range(cost_arr.size):
lcurve_y = (jreg_arr[i] - jreg_min) / (jreg_max - jreg_min)
Expand Down

0 comments on commit effe281

Please sign in to comment.