def constrain(value, lower=-np.Inf, upper=np.Inf, allow_equal=False):
    """
    Apply interval constraint on stochastic value.
    """

    ok = flib.constrain(value, lower, upper, allow_equal)
    if ok == 0:
        raise ZeroProbability
def constrain ( value , lower = - np . Inf , upper = np . Inf , allow_equal = False ) : ok = flib . constrain ( value , lower , upper , allow_equal ) if ok == 0 : raise ZeroProbability
Apply interval constraint on stochastic value.