I have a 3D array of shape (800,5,4) like:
arr = array([[35. , 33. , 33. , 0.15],
[47. , 47. , 44. , 0.19],
[49. , 56. , 60. , 0.31],
...,
[30. , 27. , 25. , 0.07],
[54. , 49. , 42. , 0.14],
[33. , 30. , 28. , 0.22]])
I have a 1D array of indeces for the second dimension (so they range from 0 to 4) like this:
indeces = [0,3,2,0,1,1,1,0,...,0,1,2,2,4,3]
I want to select the idx item from the second dimension, and get back an array of shape (800,4)
I have tried the following but could not make it work:
indexed = arr[:,indeces,:]
What am I missing?