On Thu, Feb 20, 2014 at 1:36 AM, Wai Yip Tung <[email protected]> wrote:

> I am trying to port some code from Python to Julia. I was using a function
> numpy.random.choice, which accept a parameter to define probability of
> each individual entry. I wonder if there is a corresponding Julia function.
>

This ought to do the trick:
https://github.com/JuliaStats/StatsBase.jl#sampling-from-population.


> Another more basic question is how do we do number formatting like %0.2f ?
>

@printf("%0.2f", x)

Reply via email to