Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

apply same shuffle to two arrays numpy

def unison_shuffled_copies(a, b):
    assert len(a) == len(b)
    p = numpy.random.permutation(len(a))
    return a[p], b[p]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #apply #shuffle #arrays #numpy
ADD COMMENT
Topic
Name
4+5 =