[Numpy-discussion] sample without replacement

Alan G Isaac alan.isaac@gmail....
Tue Dec 21 07:25:33 CST 2010


On 12/20/2010 10:49 PM, josef.pktd@gmail.com wrote:
> What's the difference between a numpy Random and a python
> random.Random instance of separate states of the random number
> generators?


Sorry, I don't understand the question.  The difference
for my use is that a np.RandomState instance provides
access to a different set of methods, which unfortunately
does not include an equivalent to random.Random's sample
method but which does include others I need.

Would it be appropriate to request that an analog
to random.sample be added to numpy.random?
(It might sample only a range, since producing indexes
would provide the base functionality.)
Or is this functionality absent intentionally?

Alan



More information about the NumPy-Discussion mailing list