I have an array arr and a list of indices that I want to get indices. I want to get subset of array corresponding to items in indices and the complement of that.
For example
for
arr = np.asarray([2, 4, 1, 5, 6])
indices = np.asarray([2, 4])
I would get
[1, 6] and [2, 4, 5]
Thanks
[2, 4, 5]come from in your result?arra numpy array? If so, please edit your code accordingly