title: Drop some values from numpy array to reshape them properly?
body: <p>I have a numpy array of shape <code>(231250, 19)</code>, when i try to reshape it into <code>(-1,1000,19)</code>, it gives me error. <code>cannot reshape array of size 4393750 into shape (1000,19)</code>. Reason is that my numpy array cannot be completed divisible. <code>4393750/19/1000</code> give me answer with decimal points. 
  What i want is to remove some elements from numpy array, so that it should be completely reshaped.  if i remove 4750 elemts from my array, i can reshape my array</p>
  
  <p>Each time the rows of array is different, so i am unable to think a generic solution.
  Please help me to solve this  .</p>
  
  <p>I have come up with this solution</p>
  
  <pre><code>shape=data.ravel().shape[0]
  s=shape%19000
  if s!=0:
      d=data.ravel()[s//2:-s//2].reshape(-1,1000,19)
  </code></pre>