DistractiveEnv.render#

DistractiveEnv.render() ndarray | None#

Compute the render frames as specified by render_mode.

By convention, if the render_mode is:

  • None (default): no render is computed.

  • “human”: The environment is continuously rendered in the current PyGame display. This rendering occurs during step() and render() doesn’t need to be called. Returns None.

  • “rgb_array”: Return a single frame representing the current state of the environment. A frame is a np.ndarray with shape (x, y, 3) representing RGB values for an x-by-y pixel image.

See also

The method is part of the Gymnasium environment api.

Returns:

A frame for render_mode = “rgb_array”, None otherwise.

Return type:

np.ndarray | None