mesa.multiomics.multiomics_spatial.get_spatial_knn_indices
- mesa.multiomics.multiomics_spatial.get_spatial_knn_indices(locations, n_neighbors=15, method='kd_tree')
Compute k-nearest neighbors of locations.
- Parameters:
- Returns:
knn_indices – Each row represents the knn of that sample
- Return type:
np.ndarray of shape (n_samples, n_neighbors)