What is the right way to specify an open bound in Uniform RV?

The Uniform RV in PyMC3 has lower and upper bounds that make a closed interval. What’s the right way to do open intervals (e.g., Uniform > 0)? Do we just make it Uniform(0 + ε)? So is this right?

pm.Uniform("U", np.finfo(float).eps, upper)

(for some value of upper)

1 Like

That’s what I would do as well.

@junpenglao Thanks for taking the time to confirm this. Do you think it would make sense to support something like:

pm.Uniform("U", lower='>0', upper)

Using ‘np.finfo(float).eps’ for “strictly greater than zero” is … yucky.