Skip to content

Commit

Permalink
fix bug when RCs are nan
Browse files Browse the repository at this point in the history
  • Loading branch information
bknueven committed Nov 22, 2024
1 parent ad2d9af commit 159608c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mpisppy/extensions/reduced_costs_rho.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def sync_with_spokes(self):
else:
if self.opt.cylinder_rank == 0 and self.verbose:
print("No new reduced costs!")
# These may be `nan` if the nonant is fixed
self._scenario_rc_buffer = np.nan_to_num(self._scenario_rc_buffer, copy=False)

def pre_iter0(self):
self.nonant_length = self.opt.nonant_length
Expand Down

0 comments on commit 159608c

Please sign in to comment.