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

Fix rand(FixedRNG(), Bool) #127

Closed
cscherrer opened this issue Aug 21, 2023 · 3 comments
Closed

Fix rand(FixedRNG(), Bool) #127

cscherrer opened this issue Aug 21, 2023 · 3 comments
Assignees

Comments

@cscherrer
Copy link
Collaborator

Currently we have

(MeasureBase) pkg> st MeasureBase
Project MeasureBase v0.14.7
No Matches in `~/git/MeasureBase.jl/Project.toml`

julia> rand(FixedRNG(), Bool)
0.5

This is bad, since we should always have rand(rng, T) isa T. In particular, it gets in the way of JuliaMath/MeasureTheory.jl#260

@cscherrer cscherrer self-assigned this Aug 21, 2023
@oschulz
Copy link
Collaborator

oschulz commented Aug 21, 2023

Yes, I think false would be best? Or rather true?

@cscherrer
Copy link
Collaborator Author

Right, in JuliaMath/MeasureTheory.jl#260 I'm temporarily adding "licensed type piracy", MeasureBase.rand(::FixedRNG, ::Type{Bool}) = true. I'll remove that once MB adds it

@cscherrer
Copy link
Collaborator Author

Closing this, ConstantRNGs.jl v0.1.1 addresses the issue

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

No branches or pull requests

2 participants