(space)
Converts a rl-gym space to our own space representation
Converts a rl-gym space to our own space representation
Converts a rl - gym space to our own space representation
def _convert_space(space):
    '''Converts a rl-gym space to our own space representation'''
    if isinstance(space, spaces.Box):
        assert space.low.ndim == 1 and space.low.shape >= 1
        return policyopt.ContinuousSpace(dim=space.low.shape[0])
    elif isinstance(space, spaces.Discrete):
        return policyopt.FiniteSpace(size=space.n)
    raise NotImplementedError(space)
def _convert_space ( space ) : if isinstance ( space , spaces . Box ) : assert space . low . ndim == 1 and space . low . shape >= 1 return policyopt . ContinuousSpace ( dim = space . low . shape [ 0 ] ) elif isinstance ( space , spaces . Discrete ) : return policyopt . FiniteSpace ( size = space . n ) raise NotImplementedError ( space )