Functions like numpy.random.uniform()
return floating point values between a two bounds, including the first bound but excluding the top one. That is, numpy.random.uniform(0,1)
may yield 0 but will never result in 1.
I'm taking such numbers and processing them with a function that sometimes returns results outside of the range. I can use numpy.clip()
to chop values outside of the range back to 0-1, but unfortunately that limit is inclusive of the top number.
How do I specify "the number infinitesimally smaller than 1" in python?