popgym.wrappers.flatten ======================= .. py:module:: popgym.wrappers.flatten Classes ------- .. autoapisummary:: popgym.wrappers.flatten.Flatten Module Contents --------------- .. py:class:: Flatten(env: popgym.core.env.POPGymEnv, flatten_action: bool = True, flatten_observation: bool = True) Bases: :py:obj:`popgym.core.wrapper.POPGymWrapper` Wrapper that flattens the observation and action spaces to make them compatible with neural networks. .. py:attribute:: need_flatten_action :value: False .. py:attribute:: need_flatten_obs :value: False .. py:method:: step(action: gymnasium.core.ActType) -> Tuple[gymnasium.core.ObsType, float, bool, bool, dict] Uses the :meth:`step` of the :attr:`env` that can be overwritten to change the returned data. .. py:method:: reset(**kwargs) Uses the :meth:`reset` of the :attr:`env` that can be overwritten to change the returned data. .. py:method:: continuous(space: gymnasium.spaces.Space) -> bool