def _point_cloud_error_balltree(src_pts, tgt_tree):
 (dist, _) = tgt_tree.query(src_pts)
 return dist.ravel()

def _point_cloud_error_balltree ( src_pts , tgt_tree ) : ( dist , _ ) = tgt_tree . query ( src_pts ) return dist . ravel ( )
find the distance from each source point to its closest target point .