I have an n-dimensional numpy array, and I\'d like to get the i-th slice of the k-th dimension. There must be something better than
n
i
k
I am not sure if it will work for k dim but it does for 2 dim
a.take(i,axis=k)