-
Notifications
You must be signed in to change notification settings - Fork 430
Closed
Description
Implementing a univariate sampler as described in the documentation, i.e. just implementing the function
function rand(s::Spl)
# ... generate a single sample from s
end
is not working as expected. Specifically, the documentation says:
The package already implements a vectorized version of rand! and rand that repeatedly calls the he scalar version to generate multiple samples.
So after implementing the function above, I was expecting generating several samples at once (calling rand(mysampler, 10000)
) to work, but it throws an error. However, it works fine if the function rand(rng::AbstractRNG, s::Spl)
is implemented.
For a full code example, see this discussion on julia discourse.
Is the documentation regarding custom samplers perhaps outdated?
Metadata
Metadata
Assignees
Labels
No labels