title: Outer product of each column of a 2D array to form a 3D array - NumPy
body: <p>Let X be a M x N matrix. Denote xi the i-th column of X. I want to create a 3 dimensional N x M x M array consisting of M x M matrices <code>xi.dot(xi.T)</code>. </p>
  
  <p>How can I do it most elegantly with numpy? Is it possible to do this using only matrix operations, without loops?</p>