class_docstr: Vectorized environment that serially runs multiple environments.
  
  Example::
  
      >>> import gym
      >>> env = gym.vector.SyncVectorEnv([
      ...     lambda: gym.make("Pendulum-v0", g=9.81),
      ...     lambda: gym.make("Pendulum-v0", g=1.62)
      ... ])
      >>> env.reset()
      array([[-0.8286432 ,  0.5597771 ,  0.90249056],
             [-0.85009176,  0.5266346 ,  0.60007906]], dtype=float32)
class_docstr_tok: ["Vectorized","environment","that","serially","runs","multiple","environments",".","Example",":",":",">",">",">","import","gym",">",">",">","env","=","gym.vector.SyncVectorEnv","(","[","...","lambda",":","gym.make","(","``","Pendulum-v0","''",",","g=9.81",")",",","...","lambda",":","gym.make","(","``","Pendulum-v0","''",",","g=1.62",")","...","]",")",">",">",">","env.reset","(",")","array","(","[","[","-0.8286432",",","0.5597771",",","0.90249056","]",",","[","-0.85009176",",","0.5266346",",","0.60007906","]","]",",","dtype=float32",")"]
docstr: Steps through each of the environments returning the batched results.
  
  Returns:
      The batched environment step results
docstr_tok: ["Steps","through","each","of","the","environments","returning","the","batched","results",".","Returns",":","The","batched","environment","step","results"]
code: def step_wait(self):
      """Steps through each of the environments returning the batched results.
  
      Returns:
          The batched environment step results
      """
      observations, infos = [], {}
      for i, (env, action) in enumerate(zip(self.envs, self._actions)):
          (
              observation,
              self._rewards[i],
              self._terminateds[i],
              self._truncateds[i],
              info,
          ) = env.step(action)
  
          if self._terminateds[i] or self._truncateds[i]:
              old_observation, old_info = observation, info
              observation, info = env.reset()
              info["final_observation"] = old_observation
              info["final_info"] = old_info
          observations.append(observation)
          infos = self._add_info(infos, info, i)
      self.observations = concatenate(
          self.single_observation_space, observations, self.observations
      )
  
      return (
          deepcopy(self.observations)
          if self.copy
          else self.observations,
          np.copy(self._rewards),
          np.copy(self._terminateds),
          np.copy(self._truncateds),
          infos,
      )
  
file_path: gym/gym/vector/sync_vector_env.py
imports: from copy import deepcopy
  from typing import Any, Callable, Iterator, List, Optional, Sequence, Union
  import numpy
  from gym import Env
  from gym.spaces import Space
  from gym.vector.utils import concatenate, create_empty_array, iterate
  from gym.vector.vector_env import VectorEnv
label_desc: Use image node_id 5 for calling the SyncVectorEnv obj's underlying member method code with example usage: obj.step_wait() and returns: unknown,  np,  np,  np,  infos