Skip to content

Instantly share code, notes, and snippets.

@laat
Created October 25, 2011 15:26
Show Gist options
  • Save laat/1313127 to your computer and use it in GitHub Desktop.
Save laat/1313127 to your computer and use it in GitHub Desktop.
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