Consider a numpy ndarray M of shape (say) (a,b,c) and a list of coordinates [(b0,c0),(b1,c1),...,(bn,cn)].
I want the following collection of vectors: [M[:,b0,c0],M[:,b1,c1],...,M[:,bn,cn]].
How can I achieve this with list comprehension?
EDIT: I need a solution that works for any number of dimensions, i.e. something that returns a list like the one above also in the case (say) M.shape = (a,b,c,d) and coordinates = [(b0,c0,d0),...,(bn,cn,dn)], and higher-dimensional cases as well.