helpers.py
def check_space(space):
    """ Check the properties of an environment state or action space """
    if isinstance(space, spaces.Box):
        dim = space.shape
        discrete = False    
    elif isinstance(space, spaces.Discrete):
        dim = space.n
        discrete = True
    else:
        raise NotImplementedError('This type of space is not supported')
    return dim, discrete
 Check the properties of an environment state or action space 
Check the properties of an environment state or action space
Check the properties of an environment state or action space
def check_space(space):
    if isinstance(space, spaces.Box):
        dim = space.shape
        discrete = False    
    elif isinstance(space, spaces.Discrete):
        dim = space.n
        discrete = True
    else:
        raise NotImplementedError('This type of space is not supported')
    return dim, discrete
def check_space ( space ) : if isinstance ( space , spaces . Box ) : dim = space . shape discrete = False elif isinstance ( space , spaces . Discrete ) : dim = space . n discrete = True else : raise NotImplementedError ( 'This type of space is not supported' ) return dim , discrete
Check the properties of an environment state or action space
Check the properties of an environment state or action space
""" Check the properties of an environment state or action space """
space