title: splitting an array into two smaller arrays in python
body: <p>I have an array of size 80x40 and want to send each row into one of two smaller arrays based on a value in a specific column (10). I have code similar to below-but this ends up flattening the array. I don't know the Y dimensions of the output arrays (Array2,Array3). I guess I could have some code count all the values above and below 50 to get the Y dimensions of the output axes and then make 2 output arrays of np.zeros(Array.shape[0],Yvalues) and append row by row to that but I'm still not sure how that would work.</p>
  
  <pre><code>Array.shape=(80,40)
  Array2=[]
  Array3=[]
  
  for x in range(0,Array.shape[0]):
      if Array[x,10]&lt;50:
          Array2.append(Array[x,:])
      else:
          Array3.append(Array[x,:])
  </code></pre>