#NEWLINE# def list_shuffle( * data ) : #NEWLINE# #INDENT# idxs = np_rng . permutation ( np . arange ( len ( data [ 0 ] ) ) ) #NEWLINE# if ( len ( data ) == 1 ) : #NEWLINE# #INDENT# return [ data [ 0 ] [ idx ] for idx in idxs ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return [ [ data [ idx ] for idx in idxs ] for d in data ]