title: How to calculate centroid of x,y coordinates in python
body: <p>I have got a lot of x,y coordinates which I have clustered based on the distance between them.
  Now I would like to calculate a centroid measure for each cluster of x,y coordinates.
  Is there a way to do this?</p>
  
  <p>My coordinates are in the format:</p>
  
  <pre><code>    coordinates_cluster = [[x1,x2,x3,...],[y1,y2,y3,...]]
  </code></pre>
  
  <p>Each cluster has a minimum length of three points, and all points can have both negative and positive x and y values.
  I hope that someone can help me.</p>
  
  <p>Best,
  Martin</p>
  
  <p>(I am using python 2.7 with canopy 1.1.1 (32 bit) on a Windows 7 system.)</p>