def METHOD_NAME(self):
    # The sum of probs should be 1.0 with some tolerance.
    # For low precision dtypes the tolerance was too tight.
    # See numpy github issue 6123.
    mt19937 = Generator(MT19937(1234))
    a = [1, 2, 3]
    counts = [4, 4, 2]
    for dt in np.float16, np.float32, np.float64:
        probs = np.array(counts, dtype=dt) / sum(counts)
        c = mt19937.choice(a, p=probs)
        assert_(c in a)
        with pytest.raises(ValueError):
            mt19937.choice(a, p=probs*0.9)