coords.Coords.centered#
- Coords.centered()#
Return a centered copy of the
Coords.Returns#
- Coords
The Coords translated so that its
center()coincides with the origin of the global axes.
Notes#
This is equivalent with
self.translate(-self.center())Examples#
>>> X = Coords([[0.0, 0.0],[1.0, 0.0],[1.0, 1.0],[0.0, 1.0]]) >>> print(X) [[0. 0. 0.] [1. 0. 0.] [1. 1. 0.] [0. 1. 0.]] >>> print(X.centered()) [[-0.5 -0.5 0. ] [ 0.5 -0.5 0. ] [ 0.5 0.5 0. ] [-0.5 0.5 0. ]]