In [1]:
import gym
import numpy as np

In [2]:
env = gym.make('CartPole-v0')


WARN: gym.spaces.Box autodetected dtype as <class 'numpy.float32'>. Please provide explicit dtype.

In [3]:
box = env.observation_space

In [6]:
box.high


Out[6]:
array([4.8000002e+00, 3.4028235e+38, 4.1887903e-01, 3.4028235e+38],
      dtype=float32)

In [7]:
box.low


Out[7]:
array([-4.8000002e+00, -3.4028235e+38, -4.1887903e-01, -3.4028235e+38],
      dtype=float32)

In [8]:
12 * np.pi * 2 / 360


Out[8]:
0.20943951023931953

In [9]:
box.sample


Out[9]:
<bound method Box.sample of Box(4,)>

In [10]:
box


Out[10]:
Box(4,)

In [11]:
box.contains


Out[11]:
<bound method Box.contains of Box(4,)>

In [ ]: