(condition, given_condition=None, **kwargs)
return pspace(condition).where(condition, **kwargs)
Returns the domain where a condition is True.

    Examples
    ========

    >>> from sympy.stats import where, Die, Normal
    >>> from sympy import symbols, And

    >>> D1, D2 = Die('a', 6), Die('b', 6)
    >>> a, b = D1.symbol, D2.symbol
    >>> X = Normal('x', 0, 1)

    >>> where(X**2<1)
    Domain: And(-1 < x, x < 1)

    >>> where(X**2<1).set
    (-1, 1)

    >>> where(And(D1<=D2 , D2<3))
    Domain: Or(And(a == 1, b == 1), And(a == 1, b == 2), And(a == 2, b == 2))
Returns the domain where a condition is True.
Returns the domain where a condition is True .
def where(condition, given_condition=None, **kwargs):
    """
    Returns the domain where a condition is True.

    Examples
    ========

    >>> from sympy.stats import where, Die, Normal
    >>> from sympy import symbols, And

    >>> D1, D2 = Die('a', 6), Die('b', 6)
    >>> a, b = D1.symbol, D2.symbol
    >>> X = Normal('x', 0, 1)

    >>> where(X**2<1)
    Domain: And(-1 < x, x < 1)

    >>> where(X**2<1).set
    (-1, 1)

    >>> where(And(D1<=D2 , D2<3))
    Domain: Or(And(a == 1, b == 1), And(a == 1, b == 2), And(a == 2, b == 2))
    """
    if given_condition is not None:  # If there is a condition
        # Recompute on new conditional expr
        return where(given(condition, given_condition, **kwargs), **kwargs)

    # Otherwise pass work off to the ProbabilitySpace
    return pspace(condition).where(condition, **kwargs)
def where ( condition , given_condition = None , * * kwargs ) : if given_condition is not None : # If there is a condition # Recompute on new conditional expr return where ( given ( condition , given_condition , * * kwargs ) , * * kwargs ) # Otherwise pass work off to the ProbabilitySpace return pspace ( condition ) . where ( condition , * * kwargs )