code: def _pdf(self, **kwargs):
          
          for p in self._params:
              if p not in kwargs.keys():
                  raise ValueError('Missing parameter {} to construct pdf.'
                                   .format(p))
          if kwargs in self:
              # transform into the kde space
              jacobian = 1.
              for param, tparam in self._tparams.items():
                  t = self._transforms[tparam]
                  try:
                      samples = t.transform({param: kwargs[param]})
                  except ValueError as e:
                      # can get a value error if the value is exactly == to
                      # the bounds, in which case, just return 0.
                      if kwargs[param] in self.bounds[param]:
                          return 0.
                      else:
                          raise ValueError(e)
                  kwargs[param] = samples[tparam]
                  # update the jacobian for the transform; if p is the pdf
                  # in the params frame (the one we want) and p' is the pdf
                  # in the transformed frame (the one that's calculated) then:
                  # p = J * p', where J is the Jacobian of going from p to p'
                  jacobian *= t.jacobian(samples)
              # for scipy < 0.15.0, gaussian_kde.pdf = gaussian_kde.evaluate
              this_pdf = jacobian * self._kde.evaluate([kwargs[p]
                                                        for p in self._params])
              if len(this_pdf) == 1:
                  return float(this_pdf)
              else:
                  return this_pdf
          else:
              return 0.
docs: Returns the pdf at the given values. The keyword arguments must
          contain all of parameters in self's params. Unrecognized arguments are
          ignored.