Given a multi dimensional array A with N dimensions, I want to programmatically index so that : is used for all dimensions but for the k’th dimension it is fixed to a specific value v. Eg for N=4 and k=2 and v=1;
A[:,:,1,:]
I want to do this selection programmatically. Is it possible?