title: sample 2D positions into an gridded array in numpy
body: <p>I'm looking for an approach to parse xy positional information (mesh centers) into a numpy array to extract the column row information for each xy position.  z is object name (or could be a reference to FbxMesh)</p>
  
  <pre><code>[
      [1782.6000366210938, 336.4900026321411, u'5_07_05'],
      [2397.0, -1506.7100219726562, u'5_08_08'],
      [3011.4000244140625, -277.9100217819214, u'5_09_06'],
      [3011.4000244140625, 336.4900026321411, u'5_09_05'], 
      [2397.0, -277.9099597930908, u'5_08_06'],
      [2397.0, 336.4900026321411, u'5_08_05'],
      [1782.6000366210938, -1506.7100219726562, u'5_07_08'], 
      [2397.0, -892.3099975585938, u'5_08_07'], 
      [1782.6000366210938, -892.3099975585938, u'5_07_07'],
      [3011.4000244140625, -1506.7100219726562, u'5_09_08'],
      [1782.6000366210938, -277.90999126434326, u'5_07_06'], 
      [3011.4000244140625, -892.3099975585938, u'5_09_07']
  ]
  </code></pre>
  
  <p>The idea would be to reshape the array above into a correctly shaped array from the lowest value on the bottom left to the highest on the top right..  then sample the column and row index of each item [0,0] [0,1] etc..  and then export the mesh with an appropriate name..   cheers</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I can sort that above list <code>sorted_array = sorted(unsorted_array,key=lambda x: (x[0],x[1]))</code></p>
  
  <pre><code>[1782.6000366210938, -1506.7100219726562, u'5_07_08']
  [1782.6000366210938, -892.3099975585938, u'5_07_07']
  [1782.6000366210938, -277.90999126434326, u'5_07_06']
  [1782.6000366210938, 336.4900026321411, u'5_07_05']
  [2397.0, -1506.7100219726562, u'5_08_08']
  [2397.0, -892.3099975585938, u'5_08_07']
  [2397.0, -277.9099597930908, u'5_08_06']
  [2397.0, 336.4900026321411, u'5_08_05']
  [3011.4000244140625, -1506.7100219726562, u'5_09_08']
  [3011.4000244140625, -892.3099975585938, u'5_09_07']
  [3011.4000244140625, -277.9100217819214, u'5_09_06']
  [3011.4000244140625, 336.4900026321411, u'5_09_05']
  </code></pre>
  
  <p>format <code>[X, Y, 'name']</code></p>
  
  <p>I'd like to arrange this into a <strong>grid</strong> and then <strong>transpose</strong>, for example</p>
  
  <p><a href="https://i.stack.imgur.com/bvtLp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bvtLp.png" alt="grid and transpose?"></a></p>
  
  <p>After this the idea is to read out each grid cells index and the name in the array  e.g. tile_X0_Y0  etc..  </p>