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