jeudi 15 septembre 2016

Random choice without duplicates [duplicate]

This question already has an answer here:

I do this

import numpy as np
In [66]: np.random.choice(5, 3)
Out[66]: array([2, 3, 2])

If it possible to generate random numbers with numpy.random.choice without duplicates? If not, what is the best way to do it?




Aucun commentaire:

Enregistrer un commentaire