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: Sets the seed in all sub-environments.
  
  Args:
      seed: The seed
docstr_tok: ["Sets","the","seed","in","all","sub-environments",".","Args",":","seed",":","The","seed"]
code: def seed(self, seed: Optional[Union[int, Sequence[int]]] = None):
      """Sets the seed in all sub-environments.
  
      Args:
          seed: The seed
      """
      super().seed(seed=seed)
      if seed is None:
          seed = [None for _ in range(self.num_envs)]
      if isinstance(seed, int):
          seed = [seed + i for i in range(self.num_envs)]
      assert len(seed) == self.num_envs
  
      for env, single_seed in zip(self.envs, seed):
          env.seed(single_seed)
  
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 2 for calling the SyncVectorEnv obj's underlying member method code with example usage: obj.seed(seed) without return types