code: def maxlike(self, p0, **kwargs):
          
          def fn(p):
              return -self.lnpost(p)
  
          if 'method' not in kwargs:
              kwargs['method'] = 'Nelder-Mead'
  
          p0 = [0.8, 9.5, 0.0, 200, 0.2]
          fit = scipy.optimize.minimize(fn, p0, **kwargs)
          return fit
docs: Finds (local) optimum in parameter space.