You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implementing a univariate sampler as described in the documentation, i.e. just implementing the function
functionrand(s::Spl)
# ... generate a single sample from send
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.
Implementing a univariate sampler as described in the documentation, i.e. just implementing the function
is not working as expected. Specifically, the documentation says:
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 functionrand(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?
The text was updated successfully, but these errors were encountered: