parameters: (vec, batch_size=None)
return_statement: return res
docstring: vec is N x 3, batch_size is int
  
      returns N x 3 x 3. Skew_sym version of each matrix.
docstring_summary: vec is N x 3, batch_size is int
docstring_tokens: vec is N x 3 batch_size is int
function: def batch_skew(vec, batch_size=None):
      """
      vec is N x 3, batch_size is int
  
      returns N x 3 x 3. Skew_sym version of each matrix.
      """
      xp = vec.xp
      if batch_size is None:
          batch_size = vec.shape[0]
      col_inds = xp.array([1, 2, 3, 5, 6, 7])
      indices = F.reshape(
          F.repeat(col_inds.reshape(1, -1), batch_size, axis=0) +
          F.repeat(F.reshape(xp.arange(0, batch_size) * 9, [-1, 1]), 6, axis=1),
          [-1, 1])
      updates = F.reshape(
          F.stack(
              [-vec[:, 2], vec[:, 1], vec[:, 2], -vec[:, 0], -vec[:, 1],
               vec[:, 0]], axis=1), [-1])
      res = Variable(xp.zeros((batch_size * 3 * 3), 'f'))
      res.data[indices.reshape(-1).data] = updates.data
      res = F.reshape(res, [batch_size, 3, 3])
      return res
function_tokens: def batch_skew ( vec , batch_size = None ) : xp = vec . xp if batch_size is None : batch_size = vec . shape [ 0 ] col_inds = xp . array ( [ 1 , 2 , 3 , 5 , 6 , 7 ] ) indices = F . reshape ( F . repeat ( col_inds . reshape ( 1 , - 1 ) , batch_size , axis = 0 ) + F . repeat ( F . reshape ( xp . arange ( 0 , batch_size ) * 9 , [ - 1 , 1 ] ) , 6 , axis = 1 ) , [ - 1 , 1 ] ) updates = F . reshape ( F . stack ( [ - vec [ : , 2 ] , vec [ : , 1 ] , vec [ : , 2 ] , - vec [ : , 0 ] , - vec [ : , 1 ] , vec [ : , 0 ] ] , axis = 1 ) , [ - 1 ] ) res = Variable ( xp . zeros ( ( batch_size * 3 * 3 ) , 'f' ) ) res . data [ indices . reshape ( - 1 ) . data ] = updates . data res = F . reshape ( res , [ batch_size , 3 , 3 ] ) return res