Skip to content

Commit

Permalink
Fix nan mean when deterministic distribution (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasAlegre authored Jul 25, 2023
1 parent 6a99279 commit 8190c78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mo_gymnasium/envs/minecart/minecart.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ def distribution_means(self):
means = np.zeros(len(self.distributions))

for i, dist in enumerate(self.distributions):
mean, std = dist.mean(), dist.std()
mean, std = dist.args
means[i] = truncated_mean(mean, std, 0, float("inf"))
if np.isnan(means[i]):
means[i] = 0
Expand Down

0 comments on commit 8190c78

Please sign in to comment.