-
Notifications
You must be signed in to change notification settings - Fork 55
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
RcppArmadillo sample with different probabilities #275
Comments
@helmingstay Are you around and able to take a look? |
helmingstay
added a commit
to helmingstay/RcppArmadillo
that referenced
this issue
Nov 14, 2019
* Fix issue RcppCore#275: const input prob (workers modify copy)
Ouch. Thanks for @emanuelegdepaoli for the lovely bug report. The input prob vector is now passed as const and copied inside sample_main. |
Thank you @helmingstay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've found a problem with RcppArmadillo sample function when the sampling probabilities are not constant.
The code is:
and the output when the function is called in R:
Apparently the function is sampling from a discrete distribution with uniform probabilities.
The text was updated successfully, but these errors were encountered: