'min' can take multiple arguments. I'd prefer the above 2 lines to be one line:
<pre>
    iterations = min(len(relative_probabilities), len(labels), no_picks)
</pre>