title: Reshape 3D numpy matrix to 2D numpy matrix, maintaining row position
body: <p>As a simplified example, I have a 3D numpy matrix that looks like this:</p>
  <pre><code>a = np.array([[[1,2],
                 [4,np.nan],
                 [7,8]],
  
                [[7,6],
                 [4,3],
                 [1,0]],
  
                [[0,1],
                 [3,np.nan]
                 [6,7]],
  
                [[8,7],
                 [5,4],
                 [2,1]]])
  </code></pre>
  <pre><code>&gt;&gt;&gt; a.shape
  (4,3,2)
  </code></pre>
  <p>I'd like to reshape this 3D matrix (a) to a 2D matrix (b) while maintaining row position. This is the goal:</p>
  <pre><code>b = np.array([[1,2,7,6,0,1,8,7],
                [4,np.nan,4,3,3,np.nan,5,4],
                [7,8,1,0,6,7,2,1]])
  </code></pre>
  <pre><code>&gt;&gt;&gt; b.shape
  (3,8)
  </code></pre>
  <p>I think I should be able to achieve this with some combination of <code>.reshape()</code> and <code>.transpose()</code>? But I'm pretty new to this matrix manipulation stuff and it's all a bit mind-boggling. Nothing I've tried so far quite gets me there...</p>