code: def func(self, p):
          
          self._set_stochastics(p)
          try:
              return -1. * self.logp
          except ZeroProbability:
              return Inf
docs: The function that gets passed to the optimizers.