title: Stacking copies of an array/ a torch tensor efficiently?
body: <p>I'm a Python/Pytorch user. First, in numpy, let's say I have an array M of size LxL, and i want to have the following 
  array: A=(M,...,M) of size, say, NxLxL, is there a more elegant/memory efficient way of doing it than :</p>
  
  <pre><code>A=np.array([M]*N) ?
  </code></pre>
  
  <p>Same question with torch tensor !
  Cause, Now, if M is a Variable(torch.tensor), i have to do:</p>
  
  <pre><code>A=torch.autograd.Variable(torch.tensor(np.array([M]*N))) 
  </code></pre>
  
  <p>which is ugly !</p>