Open
Description
openedon May 8, 2019
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 ifsampler
is not a collection. - whether
Random.gentype
is needed at all, or should be removed from the internal code, too.
@rfourquet, please comment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment