Gaussian.to_delta (function)


def to_delta(self, loc='median')

Convert the Gaussian distribution to a Delta distribution at the Gaussian.median (or Gaussian.mean).

Arguments

  • loc (string or float, optional, default='median'): If a float, will create a delta function directly at that value. If 'median' or 'mean' will use Gaussian.median or Gaussian.mean, respectively. If 'sample', will draw a random sample from Gaussian.sample. All other strings will raise a ValueError.

Returns

Raises

  • ValueError: if the value of loc is not one of 'median', 'mean', 'sample'