Skip to content

Commit

Permalink
Replaced np.finfo(np.float32).max by np.inf in cartpole.py. Fixes #1092.
Browse files Browse the repository at this point in the history
  • Loading branch information
TimSchneider42 authored Jun 28, 2024
1 parent 3b7f398 commit de8fa84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gymnasium/envs/classic_control/cartpole.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ def __init__(
high = np.array(
[
self.x_threshold * 2,
np.finfo(np.float32).max,
np.inf,
self.theta_threshold_radians * 2,
np.finfo(np.float32).max,
np.inf,
],
dtype=np.float32,
)
Expand Down Expand Up @@ -401,9 +401,9 @@ def __init__(
high = np.array(
[
self.x_threshold * 2,
np.finfo(np.float32).max,
np.inf,
self.theta_threshold_radians * 2,
np.finfo(np.float32).max,
np.inf,
],
dtype=np.float32,
)
Expand Down

0 comments on commit de8fa84

Please sign in to comment.