code: def lpgamma(p, a):
      
      res = p * (p - 1.0) / 4.0 * log(pi)
      for ii in range(1, p+1):
          res += gammaln(a + (1.0 - ii) / 2.0)
  
      return res
docs: Multidimensional gamma / partial gamma function
  
      Parameters
      ----------
      p : int
          something....
  
      a : float
          something....
  
      Returns
      -------
      Multidimensional gamma / partial gamma function