def min_dist(coord, surface):
 d = (surface - coord)
 d2 = numpy.sum((d * d), 1)
 return numpy.sqrt(min(d2))

def min_dist ( coord , surface ) : d = ( surface - coord ) d2 = numpy . sum ( ( d * d ) , 1 ) return numpy . sqrt ( min ( d2 ) )
return minimum distance between coord and surface .