-
-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misleading documentation regarding distributions::Uniform #388
Comments
Presumably one is supposed to use |
Good point. See #392. |
Well spotted. If there is some specific need for the half-open range it may be worth revisiting our decision to use an open range by default (though maybe more documentation is all that is needed). @bgamari your thoughts on this / reason for wanting a half-open range? |
Indeed, documentation describing the motivation for the open range would be welcome. I'll admit that I found this a bit surprising. In my case I needed to generate a variate corresponding to an angle, (i.e. on [0, 2*pi)). My first intuition was to scale a standard uniform variate, but after noticing that the standard variate was open I realized I would be better off using a uniform with explicit range. |
If you want to know why see this comment or the whole thread. I'm still uncertain whether this is a good idea myself.
|
I believe this was fixed with #392? |
The first example in the documentation of
distributions::Uniform
is,The last print directly the earlier discussion of this distribution's semantics; namely that it draws from the open set (0,1).
Moreover, the documentation gives no guidance for users who want the usual half-open uniform distribution drawing from [0,1).
The text was updated successfully, but these errors were encountered: