def shuffle_array(X, y):
 idx = np.argsort([random.random() for i in xrange(len(y))])
 X = [X[i] for i in idx]
 y = [y[i] for i in idx]
 return (X, y)

def shuffle_array ( X , y ) : idx = np . argsort ( [ random . random ( ) for i in xrange ( len ( y ) ) ] ) X = [ X [ i ] for i in idx ] y = [ y [ i ] for i in idx ] return ( X , y )
shuffles two arrays! .