Created
October 25, 2011 15:26
-
-
Save laat/1313127 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def randperm(self,(seq)): | |
"""Randomly permutes the sequences in the seq tuple with | |
every sequence permuted in the same order""" | |
perm = permutation(len(seq[0])) | |
return [list(numpy.array(s)[perm]) for s in seq] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment