gustaf.utils.arr.close_rows#
- gustaf.utils.arr.close_rows(arr, tolerance=None, return_intersection=False, nthreads=None, **_kwargs)[source]#
Similar to unique_rows, but if data type is floats, use this one. Performs radius search using KDTree. Currently uses scipy.spatial.cKDTree.
- Parameters:
arr ((n, d) array-like)
tolerance ((float)) – Defaults to None.
return_intersection (bool) – Default is False. Returns intersection. For vertices with singular points, this will take a lot of memory space.
nthreads (int) – number of concurrent query. In case of napf, concurrent build as well. Default is taken from settings.NTHREADS
- Returns:
unique_arrays ((n, d) np.ndarray)
unique_ids ((m) np.ndarray)
inverse ((n) np.ndarray)
overlapping (list(list)) – id of neighbors within the tolerance.