-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
randomnessRandom number generation and the Random stdlibRandom number generation and the Random stdlib
Description
Random.gentype was introduced in #27756, so that custom random samplers would not have to use Base.eltype for returning element types, but the former falls back to the latter.
In the discussion of the recent docs cleanup PR #31787 it was unclear whether to make Random.gentype part of the API.
It would be great to decide
- whether
Random.gentype(sampler)orBase.eltype(sampler)should be the API for queryingtypeof(rand(sampler)), especially ifsampleris not a collection. - whether
Random.gentypeis needed at all, or should be removed from the internal code, too.
@rfourquet, please comment.
rfourquet
Metadata
Metadata
Assignees
Labels
randomnessRandom number generation and the Random stdlibRandom number generation and the Random stdlib