Uniform.to_delta (function)
def to_delta(self, loc='median')
Convert the Uniform distribution to a Delta distribution at the Uniform.median (or Uniform.mean).
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 Uniform.median or Uniform.mean, respectively. If 'sample', will draw a random sample from Uniform.sample. All other strings will raise a ValueError.
- a Delta object
- ValueError: if the value of
loc
is not one of 'median', 'mean', 'sample'