I'm using the shuffle() method of sklearn to shuffle the rows of m x n x o matrix and to shuffle a m x 1 vector:
from sklearn.utils import shuffle
import numpy as np
X = np.random.rand(10,4,3)
y = np.random.rand(10)
X, y = shuffle(X, y, random_state=1)
Is there a way to unshuffle the data, i.e. reverse the shuffling? I cannot store both the shuffled and unshuffled data because X is pretty large (in the example above it is small).