code: def reset_weights(self):
          
          if self.fk.isAPF:
              lw = (rs.log_mean_exp(self.logetat, W=self.W)
                    - self.logetat[self.A])
              self.wgts = rs.Weights(lw=lw)
          else:
              self.wgts = rs.Weights()
docs: Reset weights after a resampling step.