The numpy version of the beta distribution takes two extra parameters loc and shape. In order to replicate this, I have this function:
auto randomBeta(double alpha, double beta, double location, double shape) {
return (rBeta(alpha, beta) * shape) + location;
}
It would be nice to have something like this in by default.