return V

def vectorized_app1(A, B, d):
    return (1 / np.sqrt((A[:, (None)] - B) ** 2 + d ** 2)).sum(1)

def vectorized_app2(A, B, d, BSZ=100):
    dsq = d ** 2
V = np.zeros((n // BSZ, BSZ))
for i in range(n // BSZ):
    V[i] = (1 / np.sqrt((A[i * BSZ:(i + 1) * BSZ, (None)] - B) ** 2 + dsq)
        ).sum(1)
return V.ravel()
x distance between two lines of points