(expr, condition=None, **kwargs)
return next(sample_iter(expr, condition, numsamples=1))
A realization of the random expression

    Examples
    ========

    >>> from sympy.stats import Die, sample
    >>> X, Y, Z = Die('X', 6), Die('Y', 6), Die('Z', 6)

    >>> die_roll = sample(X + Y + Z) # A random realization of three dice
A realization of the random expression
A realization of the random expression
def sample(expr, condition=None, **kwargs):
    """
    A realization of the random expression

    Examples
    ========

    >>> from sympy.stats import Die, sample
    >>> X, Y, Z = Die('X', 6), Die('Y', 6), Die('Z', 6)

    >>> die_roll = sample(X + Y + Z) # A random realization of three dice
    """
    return next(sample_iter(expr, condition, numsamples=1))
def sample ( expr , condition = None , * * kwargs ) : return next ( sample_iter ( expr , condition , numsamples = 1 ) )