Reputation: 13
uniform(a,b)
returns values in the range [a,b). How to turn this interval into (a,b)?
Upvotes: 1
Views: 459
Reputation: 362557
This seems simple enough:
def my_uniform(a, b):
while True:
result = uniform(a, b)
if a < result < b:
return result
Upvotes: 2