Created
September 9, 2017 12:41
-
-
Save vaclavcadek/ba3e3563e0fa94e81042c8b739728d2f to your computer and use it in GitHub Desktop.
Elegant way to shuffle numpy array - e.g. before training
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
permutation = list(np.random.permutation(m)) | |
shuffled_X = X[:, permutation] | |
shuffled_Y = Y[:, permutation].reshape((1,m)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment