user295944
user295944

Reputation: 373

Julia random number generators not working

New to Julia, trying to just run this example

http://timsalimans.com/gibbs-sampling-with-julia/

but I cannot use the functions "randg" as it says it is not defined. Am I missing something?

Upvotes: 2

Views: 453

Answers (1)

Rob Neuhaus
Rob Neuhaus

Reputation: 9300

I pieced together information from http://www.johnmyleswhite.com/notebook/2012/06/21/the-great-julia-rng-refactor/ and http://www.cita.utoronto.ca/~nolta/julia/pygments/monokai/deprecated.jl.html.

randg() is deprecated. You need to use the rand() function on a Gamma object from the Distributions package.

Upvotes: 7

Related Questions