Skip to content

Instantly share code, notes, and snippets.

@idleuncle
Last active March 7, 2020 04:35
Show Gist options
  • Save idleuncle/fac94167a0261154457b5cfc96d6a8ac to your computer and use it in GitHub Desktop.
Save idleuncle/fac94167a0261154457b5cfc96d6a8ac to your computer and use it in GitHub Desktop.
[Shuffle]
def shuffle(train_data: np.array, seed: int = 8864):
np.random.seed(seed)
n = train_data.shape[0]
indices = np.random.randint(0, n, n)
train_data = [train_data[i] for i in indices]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment