I have a numpy array that looks like the following [-1,0,1,0,1,2,1,2,3,...,n-1,n,n+1,n,n+1,n+2..] I would like to shuffle the array in chunks of 3, is there an efficient way to do it in numpy?
I know you can shuffle a numpy array using the following shuffle method, but this gives me a fully shuffled array. Is there a way to shuffle it in chunks in numpy?
import numpy.random as rng
ind = numpy.arange(100)
rng = numpy.random.RandomState(123)
rng.shuffle(ind)