class_docstr: A tuple representing a batch of TimeSteps.
  
  Data type for off-policy algorithms, imitation learning and batch-RL.
  
  Attributes:
      env_spec (EnvSpec): Specification for the environment from
          which this data was sampled.
      episode_infos (dict[str, np.ndarray]): A dict of numpy arrays
          containing the episode-level information of each episode. Each
          value of this dict should be a numpy array of shape :math:`(N,
          S^*)`. For example, in goal-conditioned reinforcement learning this
          could contain the goal state for each episode.
      observations (numpy.ndarray): Non-flattened array of observations.
          Typically has shape (batch_size, S^*) (the unflattened state space
          of the current environment).
      actions (numpy.ndarray): Non-flattened array of actions. Must
          have shape (batch_size, S^*) (the unflattened action space of the
          current environment).
      rewards (numpy.ndarray): Array of rewards of shape (batch_size, 1).
      next_observation (numpy.ndarray): Non-flattened array of next
          observations. Has shape (batch_size, S^*). next_observations[i] was
          observed by the agent after taking actions[i].
      env_infos (dict): A dict arbitrary environment state
          information.
      agent_infos (dict): A dict of arbitrary agent state information. For
          example, this may contain the hidden states from an RNN policy.
      step_types (numpy.ndarray): A numpy array of `StepType with shape (
          batch_size,) containing the time step types for all transitions in
          this batch.
  
  Raises:
      ValueError: If any of the above attributes do not conform to their
          prescribed types and shapes.
class_docstr_tok: ["A","tuple","representing","a","batch","of","TimeSteps",".","Data","type","for","off-policy","algorithms",",","imitation","learning","and","batch-RL",".","Attributes",":","env_spec","(","EnvSpec",")",":","Specification","for","the","environment","from","which","this","data","was","sampled",".","episode_infos","(","dict","[","str",",","np.ndarray","]",")",":","A","dict","of","numpy","arrays","containing","the","episode-level","information","of","each","episode",".","Each","value","of","this","dict","should","be","a","numpy","array","of","shape",":","math",":","`","(","N",",","S^","*",")","`",".","For","example",",","in","goal-conditioned","reinforcement","learning","this","could","contain","the","goal","state","for","each","episode",".","observations","(","numpy.ndarray",")",":","Non-flattened","array","of","observations",".","Typically","has","shape","(","batch_size",",","S^","*",")","(","the","unflattened","state","space","of","the","current","environment",")",".","actions","(","numpy.ndarray",")",":","Non-flattened","array","of","actions",".","Must","have","shape","(","batch_size",",","S^","*",")","(","the","unflattened","action","space","of","the","current","environment",")",".","rewards","(","numpy.ndarray",")",":","Array","of","rewards","of","shape","(","batch_size",",","1",")",".","next_observation","(","numpy.ndarray",")",":","Non-flattened","array","of","next","observations",".","Has","shape","(","batch_size",",","S^","*",")",".","next_observations","[","i","]","was","observed","by","the","agent","after","taking","actions","[","i","]",".","env_infos","(","dict",")",":","A","dict","arbitrary","environment","state","information",".","agent_infos","(","dict",")",":","A","dict","of","arbitrary","agent","state","information",".","For","example",",","this","may","contain","the","hidden","states","from","an","RNN","policy",".","step_types","(","numpy.ndarray",")",":","A","numpy","array","of","`","StepType","with","shape","(","batch_size",",",")","containing","the","time","step","types","for","all","transitions","in","this","batch",".","Raises",":","ValueError",":","If","any","of","the","above","attributes","do","not","conform","to","their","prescribed","types","and","shapes","."]
docstr: Get an array of boolean indicating ternianal information.
  
  Returns:
      numpy.ndarray: An array of boolean of shape :math:`(N,)`
          indicating whether the `StepType is `TERMINAL
docstr_tok: ["Get","an","array","of","boolean","indicating","ternianal","information",".","Returns",":","numpy.ndarray",":","An","array","of","boolean","of","shape",":","math",":","`","(","N",",",")","`","indicating","whether","the","`","StepType","is","`","TERMINAL"]
code: def terminals(self):
      """Get an array of boolean indicating ternianal information.
  
      Returns:
          numpy.ndarray: An array of boolean of shape :math:`(N,)`
              indicating whether the `StepType is `TERMINAL
  
      """
      return np.array([s == StepType.TERMINAL for s in self.step_types])
  
imports: from dataclasses import dataclass
  import enum
  from typing import Dict, List
  import warnings
  import numpy
  from garage.np import concat_tensor_dict_list, pad_batch_array, slice_nested_dict, stack_tensor_dict_list
label_desc: Use image node_id 5 for calling the TimeStepBatch obj's underlying member method code with example usage: obj.terminals() and returns: np