napf.base.KDT.unique_data_and_inverse#
- KDT.unique_data_and_inverse(radius, return_unique=True, return_intersection=True, nthread=None)[source]#
Finds unique tree data with in given radius tolerance.
- Parameters:
radius (float)
return_unique (bool) – Default is True. Otherwise, will be an empty array return.
return_intersection (bool) – Default is True, Otherwise, will be an empty UIntVectorVector return.
nthread (int)
- Returns:
unique_data (np.ndarray) – Empty if return_unique is False. Same as kdt.tree_data[unique_ids].
unique_ids (np.ndarray) – Indices of unique entries from tree data. First occurrence is considered unique.
inverse_ids (np.ndarray) – Indices to reconstruct original tree_data with unique_data. kdt.tree_data == unique_data[inverse_ids]
intersection (UIntVectorVector) – Empty if return_intersection is False. Intersection of each data with respect to all the others.