discrete.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:gym 作者: openai 项目源码 文件源码
def contains(self, x):
        if isinstance(x, int):
            as_int = x
        elif isinstance(x, (np.generic, np.ndarray)) and (x.dtype.kind in np.typecodes['AllInteger'] and x.shape == ()):
            as_int = int(x)
        else:
            return False
        return as_int >= 0 and as_int < self.n
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号