How to Calculate Centroid in python,"nx.mean(data[:, -3:], axis=0)"