Lets say we have an array A with size NxMxO and we look at a specific index say A(0,0,span) and I find the max value and index (Idx). On this index I want to extract A(0,0,seq(Idx-2,Idx+2) and copy to another NxMx5 array B(0,0,seq(0,4)). I want to repeat this for the remaining NxM index to populate my B array. Normally I will specify three NxMx5 arrays and do B=A(X,Y,Z) in other language like matlab or python but it seems that I can't do this with arrayfire. Please let me know if this is clearer.
Thanks!