ok, but how do I fetch those x values that match the ids?
my output of shape (5,10,1) are only the max values of x with  respect to last dimension.
In a simple 2D case:
x = [ [1,2,3],
[4, 5, 2]]
ids = [2,1] # 2 because of fetching ‘3’ and 1 because of fetching ‘5’
then i want my output to be
[3,5]. Right?