Previous topic

geomm.centering module

Next topic

geomm.distance module

This Page

geomm.centroid module

geomm.centroid.centroid(coords, weights=None)[source]

Return the centroid (AKA center of geometry or when weights correspond to masses the ‘center of mass (COM)’) of a set of coordinates.

Parameters
  • coords (arraylike) – The coordinates to find the centroid of.

  • weights (arraylike, optional) –

    Optional weights for the coordinates to compute a weighted

    centroid (center of mass).

    (Default = None)