def _point_cloud_error(src_pts, tgt_pts):
    from scipy.spatial.distance import cdist
    Y = cdist(src_pts, tgt_pts, 'euclidean')
    dist = Y.min(axis=1)
    return dist
Find the distance from each source point to its closest target point
dataset/ETHPy150Open mne-tools/mne-python/mne/coreg.py/_point_cloud_error