random permutation numpy code example Example: numpy generate random permutation >>> np.random.permutation(10) array([1, 7, 4, 3, 0, 9, 2, 5, 8, 6])