(self, done)
Sets the `done` flag in the last timestep.
Sets the `done` flag in the last timestep.
Sets the done flag in the last timestep .
def done(self, done):
    """Sets the `done` flag in the last timestep."""
    if not self._timesteps:
      raise ValueError('No interactions yet in the trajectory.')
    self._timesteps[-1] = self._timesteps[-1]._replace(done=done)
def done ( self , done ) : if not self . _timesteps : raise ValueError ( 'No interactions yet in the trajectory.' ) self . _timesteps [ - 1 ] = self . _timesteps [ - 1 ] . _replace ( done = done )