title: How to flatten only some dimensions of a numpy array
body: <p>Is there a quick way to "sub-flatten" or flatten only some of the first dimensions in a numpy array?</p>
  
  <p>For example, given a numpy array of dimensions <code>(50,100,25)</code>, the resultant dimensions would be <code>(5000,25)</code></p>