how to calculate centroid in python,"data[:, -3:]"