>>> from gym.spaces import Discrete, Tuple,Box
>>> tu= Tuple( [Discrete(3), Discrete(2), Discrete(4)])
>>> tu.contains([3,1,3])
False
>>> tu.contains([2,1,3])
True
>>> tu.contains([2,1,0,0])
False
>>> import numpy as np
>>> h = np.array(h)
>>> tu = Box(-h,h,dtype=np.float32)
/home/rlon/.conda/envs/spinningup/lib/python3.6/site-packages/gym/logger.py:30: UserWarning: WARN: Box bound precision lowered by casting to float32
warnings.warn(colorize('%s: %s'%('WARN', msg % args), 'yellow'))
>>> tu.contains([0.9,-1.9,3])
True
>>> tu.contains([0.9,-1.9,4])
False
>>> Box(low=0, high=255, shape=(100, 150, 3), dtype=np.uint8)
Box(100, 150, 3)
>>>