tomodrgn.analysis.get_nearest_point#
- get_nearest_point(data: ndarray, query: ndarray) tuple[ndarray, ndarray] [source]#
Find the closest point in data to query.
- Parameters:
data – reference array to locate “on-data” points within, shape (n_ref_points, d_dimensions)
query – query array of “off-data” points, shape (n_query_points, d_dimensions)
- Returns:
array of the nearest point within data to each point in query shape (len(query), d_dimensions), array of the corresponding indices within the data array shape (len(query))