libenv/libenv.py
def render(self, mode: str = "human") -> Union[bool, np.ndarray]:
        """
        Render the environment.

        mode='human' tells the environment to render in some human visible way and
        returns True if the user user visible window created by the environment is still open

        Other modes are up to the environment, but end up returning a numpy array of some kind
        that will be tiled as if it were an image by this code.  Call get_images() instead if
        that is not the behavior you want.
        """
        if (
            mode == "human"
            and "human" not in self.metadata["render.modes"]
            and "rgb_array" in self.metadata["render.modes"]
        ):
            # fallback human mode
            viewer = self.get_viewer()
            self._render(mode="rgb_array")
            images = self._renders["rgb_array"]
            viewer.imshow(self._tile_images(images))
            return viewer.isopen

        isopen = self._render(mode=mode)
        if mode == "human":
            return isopen
        else:
            images = self._renders[mode]
            return self._tile_images(images)

        Render the environment.

        mode='human' tells the environment to render in some human visible way and
        returns True if the user user visible window created by the environment is still open

        Other modes are up to the environment, but end up returning a numpy array of some kind
        that will be tiled as if it were an image by this code.  Call get_images() instead if
        that is not the behavior you want.
        
Render the environment.
mode='human' tells the environment to render in some human visible way and
returns True if the user user visible window created by the environment is still open

Other modes are up to the environment, but end up returning a numpy array of some kind
that will be tiled as if it were an image by this code.  Call get_images() instead if
that is not the behavior you want.
Render the environment . mode = ' human ' tells the environment to render in some human visible way and returns True if the user user visible window created by the environment is still open Other modes are up to the environment but end up returning a numpy array of some kind that will be tiled as if it were an image by this code . Call get_images () instead if that is not the behavior you want .
def render(self, mode: str = "human") -> Union[bool, np.ndarray]:
        if (
            mode == "human"
            and "human" not in self.metadata["render.modes"]
            and "rgb_array" in self.metadata["render.modes"]
        ):
            viewer = self.get_viewer()
            self._render(mode="rgb_array")
            images = self._renders["rgb_array"]
            viewer.imshow(self._tile_images(images))
            return viewer.isopen
        isopen = self._render(mode=mode)
        if mode == "human":
            return isopen
        else:
            images = self._renders[mode]
            return self._tile_images(images)
def render ( self , mode : str = "human" ) -> Union [ bool , np . ndarray ] : if ( mode == "human" and "human" not in self . metadata [ "render.modes" ] and "rgb_array" in self . metadata [ "render.modes" ] ) : viewer = self . get_viewer ( ) self . _render ( mode = "rgb_array" ) images = self . _renders [ "rgb_array" ] viewer . imshow ( self . _tile_images ( images ) ) return viewer . isopen isopen = self . _render ( mode = mode ) if mode == "human" : return isopen else : images = self . _renders [ mode ] return self . _tile_images ( images )
Render the environment.
Render the environment .
"""
        Render the environment.

        mode='human' tells the environment to render in some human visible way and
        returns True if the user user visible window created by the environment is still open

        Other modes are up to the environment, but end up returning a numpy array of some kind
        that will be tiled as if it were an image by this code.  Call get_images() instead if
        that is not the behavior you want.
        """ # fallback human mode

self
mode
str