np.sqrt(np.square(A[:, (None)].T - A.T).sum(axis=2))
array([[0.0, 3.0, 6.0, 0.0, 3.0, 6.0, 0.0, 3.0, 6.0], [3.0, 0.0, 3.0, 3.0, 
    0.0, 3.0, 3.0, 0.0, 3.0], [6.0, 3.0, 0.0, 6.0, 3.0, 0.0, 6.0, 3.0, 0.0],
    [0.0, 3.0, 6.0, 0.0, 3.0, 6.0, 0.0, 3.0, 6.0], [3.0, 0.0, 3.0, 3.0, 0.0,
    3.0, 3.0, 0.0, 3.0], [6.0, 3.0, 0.0, 6.0, 3.0, 0.0, 6.0, 3.0, 0.0], [
    0.0, 3.0, 6.0, 0.0, 3.0, 6.0, 0.0, 3.0, 6.0], [3.0, 0.0, 3.0, 3.0, 0.0,
    3.0, 3.0, 0.0, 3.0], [6.0, 3.0, 0.0, 6.0, 3.0, 0.0, 6.0, 3.0, 0.0]])
Given a list of n points, how can I generate a matrix that contains the distance from every point to every other point using numpy?