title: Indexing matrix with values from vector in theano
body: <p>I'm working on a cost function in theano and faced the following problem:
  I have a matrix M (say <code>[[3,4],[5,6]]</code>), a vector v (<code>[0,1]</code>) and I would like to get the vector of entries in M corresponding to the indexes contained in v (here <code>[3,6]</code>). Is there a command to do exactly that?</p>
  
  <p>Edit: I ended up doing the following : M[T.arange(v.shape[0]), v], where T.arange(v.shape[0]) is just a vector which entries are integers in the range of the length of v. M needed to be indexed with a list of two vectors</p>