def METHOD_NAME(self, xs, ys, point_1, point_2):
    '''
    compute the distance from point to a line
    ys: coordinates in the first axis
    xs: coordinates in the second axis
    point_1, point_2: (x, y), the end of the line
    '''
    height, width = xs.shape[:2]
    square_distance_1 = np.square(xs
                                  - point_1[0]) + np.square(ys
                                                            - point_1[1])
    square_distance_2 = np.square(xs
                                  - point_2[0]) + np.square(ys
                                                            - point_2[1])
    square_distance = np.square(point_1[0]
                                - point_2[0]) + np.square(point_1[1]
                                                          - point_2[1])
    cosin = (square_distance - square_distance_1 - square_distance_2) / \
        (2 * np.sqrt(square_distance_1 * square_distance_2))
    square_sin = 1 - np.square(cosin)
    square_sin = np.nan_to_num(square_sin)
    result = np.sqrt(square_distance_1 * square_distance_2
                     * np.abs(square_sin) / (square_distance + 1e-6))
    result[cosin < 0] = np.sqrt(
        np.fmin(square_distance_1, square_distance_2))[cosin < 0]
    # self.extend_line(point_1, point_2, result)
    return result