diff --git a/gymnasium/envs/classic_control/cartpole.py b/gymnasium/envs/classic_control/cartpole.py index 97accd5afb..1cc8c781b6 100644 --- a/gymnasium/envs/classic_control/cartpole.py +++ b/gymnasium/envs/classic_control/cartpole.py @@ -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, ) @@ -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, )