
i'm trying to use the results of permutation (from RandomArray.py) to reorder the rows of an array:
i can use a for loop to permutate the ordering of r, but that has a speed hit associated with it. can anyone offer a suggestion for a way to do this more efficiently? thanks, serge -- Sergio J. Rey http://typhoon.sdsu.edu/rey.html

Serge Rey wrote:
Try: y = take(r, permutation(len(r))) Scott -- Scott M. Ransom Address: Harvard-Smithsonian CfA Phone: (617) 496-7908 60 Garden St. MS 10 email: ransom@cfa.harvard.edu Cambridge, MA 02138 GPG Fingerprint: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989

Serge Rey wrote:
Try: y = take(r, permutation(len(r))) Scott -- Scott M. Ransom Address: Harvard-Smithsonian CfA Phone: (617) 496-7908 60 Garden St. MS 10 email: ransom@cfa.harvard.edu Cambridge, MA 02138 GPG Fingerprint: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989
participants (2)
-
Scott Ransom
-
Serge Rey