coords.Coords.match#
- Coords.match(coords, **kargs)#
Match points in another
Coordsobject.Find the points from another Coords object that coincide with (or are very close to) points of
self. This method works by concatenating the serialized point sets of both Coords and then fusing them.Parameters#
Returns#
- 1-dim int array
The array has a length of coords.n_points(). For each point in coords it holds the index of a point in self coinciding with it, or a value -1 if there is no matching point. If there are multiple matching points in self, it is undefined which one will be returned. To avoid this ambiguity, you can first fuse the points of self.
See Also#
Examples#
>>> X = Coords([[1.],[2.],[3.],[1.]]) >>> Y = Coords([[1.],[4.],[2.00001]]) >>> print(X.match(Y)) [ 0 -1 1]