coords.Coords.sort#
- Coords.sort(order=(0, 1, 2))#
Sort points in the specified order of their coordinates.
Parameters#
- order: int (0,1,2) or tuple of ints (0,1,2)
The order in which the coordinates have to be taken into account during the sorting operation.
Returns#
- int array
An index into the sequential point list
self.points()thus that the points are sorted in order of the specified coordinates.
Examples#
>>> X = Coords([[5,3,0],[2,4,3],[2,3,3],[5,6,2]]) >>> X.sort() array([2, 1, 0, 3]) >>> X.sort((2,1,0)) array([0, 3, 2, 1]) >>> X.sort(1) array([0, 2, 1, 3])