How to calculate centroid of x,y coordinates in python
问题 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? My coordinates are in the format: coordinates_cluster = [[x1,x2,x3,...],[y1,y2,y3,...]] 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. Best, Martin (I am using python 2.7 with canopy 1