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

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 .