'Construct a new uniform probability distribution, that assigns
equal probability to each sample in ``samples``.
:param samples: The samples that should be given uniform
probability.
:type samples: list
:raise ValueError: If ``samples`` is empty.'

def __init__(self, samples):

    if (len(samples) == 0):
        raise ValueError((u'A    Uniform    probability    distribution    must    ' + u'have    at    least    one    sample.'))
    self._sampleset = set(samples)
    self._prob = (1.0 / len(self._sampleset))
    self._samples = list(self._sampleset)
