This page

Citing

Please consider citing the scikit-learn.

9.21.3. sklearn.utils.shuffle

sklearn.utils.shuffle(*arrays, **options)

Shuffle arrays or sparse matrices in a consistent way

This is a convenience alias to resample(*arrays, replace=False) to do random permutations of the collections.

Parameters :

*arrays : sequence of arrays or scipy.sparse matrices with same shape[0]

random_state : int or RandomState instance

Control the shuffling for reproducible behavior.

n_samples : int, None by default

Number of samples to generate. If left to None this is automatically set to the first dimension of the arrays.