title: how to reduce a 3 dim numpy array to 2 dim
body: <p>I'm trying to reduce a 3 dim numpy array into a 2 dim array but can't think of a way other than putting it in a for loop and that takes way too much time. below is my code snippet. train_dataset is a 3 dimensional array of shape (200000,28,28) and I want to convert it into a 2 dim array of shape (5600000,28) by stacking each of the 28 x 28 array 200,000 times. But the below code takes way too much time. can someone pls advice</p>
  
  <pre><code>train_data = np.empty([28,28])
  for i in range(train_dataset.shape[0]):
       train_data=np.append(train_data,train_dataset[i,:,:],axis=0)
  </code></pre>