Skip to content

Commit

Permalink
Fix stats dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
btjanaka committed Jun 14, 2024
1 parent 92f0e7b commit 2662980
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ribs/archives/_archive_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,11 @@ def _stats_update(self, new_objective_sum, new_best_index):
coverage=np_scalar(len(self) / self.cells,
dtype=self.dtypes["objective"]),
qd_score=new_qd_score,
norm_qd_score=new_qd_score / self.cells,
norm_qd_score=np_scalar(new_qd_score / self.cells,
dtype=self.dtypes["objective"]),
obj_max=new_obj_max,
obj_mean=self._objective_sum / len(self),
obj_mean=np_scalar(self._objective_sum / len(self),
dtype=self.dtypes["objective"]),
)

def add(self, solution, objective, measures, **fields):
Expand Down

0 comments on commit 2662980

Please sign in to comment.