title: How to copy a 2D array into a 3rd dimension, N times?
body: <p>I'd like to copy a numpy 2D array into a third dimension. For example, given the 2D numpy array:</p>
  <pre><code>import numpy as np
  
  arr = np.array([[1, 2], [1, 2]])
  # arr.shape = (2, 2)
  </code></pre>
  <p>convert it into a 3D matrix with N such copies in a new dimension. Acting on <code>arr</code> with <code>N=3</code>, the output should be:</p>
  <pre><code>new_arr = np.array([[[1, 2], [1,2]], 
                      [[1, 2], [1, 2]], 
                      [[1, 2], [1, 2]]])
  # new_arr.shape = (3, 2, 2)
  </code></pre>