Skip to content

Instantly share code, notes, and snippets.

@hiramekun
Created June 9, 2018 03:14
Show Gist options
  • Save hiramekun/2ff0373eb7f9f9e6e626e32aa1841e0e to your computer and use it in GitHub Desktop.
Save hiramekun/2ff0373eb7f9f9e6e626e32aa1841e0e to your computer and use it in GitHub Desktop.
特定のindexを除いた配列
array = np.array([1, 2, 3, 4, 5])
index = np.ones(5, dtype=bool)
index[3, 4] = False
array[index]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment