Skip to content

Instantly share code, notes, and snippets.

@ashunigion
Last active January 26, 2019 06:06
Show Gist options
  • Save ashunigion/eef246965132177a81e138a2f77ed937 to your computer and use it in GitHub Desktop.
Save ashunigion/eef246965132177a81e138a2f77ed937 to your computer and use it in GitHub Desktop.
used Boolean indexing to retrieve the data points with a particular labels
label_0 = train_data[train_labels==0]
label_1 = train_data[train_labels==1]
#it can be repeated for all the intermediate labels
#...
label_9 = train_data[train_labels==9]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment