Skip to content
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

rand(Beta(1.0f0, 1.0f0)) returns Float64 #1907

Open
limarta opened this issue Oct 1, 2024 · 2 comments · May be fixed by #1905
Open

rand(Beta(1.0f0, 1.0f0)) returns Float64 #1907

limarta opened this issue Oct 1, 2024 · 2 comments · May be fixed by #1905

Comments

@limarta
Copy link

limarta commented Oct 1, 2024

Hi.

Samples from Beta(1.0f0, 1.0f0) are Float64 rather than the expected Float32. This behavior seems to happen only for alpha=beta=1 and no other case. This behavior occurs when this condition is satisfied. For example

Beta(1.0f0, 1.0f0)::Float64
Beta(0.8f0, 0.8f0)::Float64
Beta(1.0f0, 2.0f0)::Float32
Beta(2.0f0, 1.0f0)::Float32
@quildtide quildtide linked a pull request Oct 2, 2024 that will close this issue
@quildtide
Copy link
Contributor

quildtide commented Oct 2, 2024

This one is a little more concerning than normal, because behavior is dependent on the value of the parameters (and not just the type of the parameters). I believe this is a regression caused by #1885

EDIT: I.e. the expected behavior a few months ago would be that both rand(Beta(1.0f0, 1.0f0) and rand(Beta(1.0f0, 2.0f0)) should return Float64. This may change with #1905

@devmotion
Copy link
Member

This issue is fixed by #1905.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants