[Numpy-discussion] Permutations in Simulations`
Mark Janikas
mjanikas@esri....
Tue Feb 10 13:29:07 CST 2009
Hello All,
I want to create an array that contains a column of permutations for each simulation:
import numpy as NUM
import numpy.random as RAND
x = NUM.arange(4.)
res = NUM.zeros((4,100))
for sim in range(100):
res[:,sim] = RAND.permutation(x)
Is there a way to do this without a loop? Thanks so much ahead of time...
MJ
Mark Janikas
Product Engineer
ESRI, Geoprocessing
380 New York St.
Redlands, CA 92373
909-793-2853 (2563)
mjanikas@esri.com<mailto:mjanikas@esri.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20090210/32a155fc/attachment.html
More information about the Numpy-discussion
mailing list