From e14c34b980fdc2bf19eb326e7d4b967f0ad6a1c0 Mon Sep 17 00:00:00 2001 From: sofmonk Date: Fri, 17 Mar 2017 17:17:51 +0530 Subject: [PATCH] Update utils.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit in pseudo code the sequence of arguments is " WEIGHTED-SAMPLE-WITH-REPLACEMENT(N, S, W)"   --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 3c070293e..714512ae0 100644 --- a/utils.py +++ b/utils.py @@ -193,7 +193,7 @@ def probability(p): return p > random.uniform(0.0, 1.0) -def weighted_sample_with_replacement(seq, weights, n): +def weighted_sample_with_replacement(n,seq, weights): """Pick n samples from seq at random, with replacement, with the probability of each element in proportion to its corresponding weight."""