coords.Coords.centroid#

Coords.centroid()#

Return the centroid of the Coords.

The centroid of Coords is the point whose coordinates are the mean values of all points.

Returns#

Coords (3,)

A single point that is the centroid of the Coords.

See also#

  • center(): return the center of the bounding box.

Examples#

>>> print(Coords([[0.,0.,0.],[3.,0.,0.],[0.,3.,0.]]).centroid())
[1. 1. 0.]