Numpy: find the euclidean distance between two 3-D arrays,np.sqrt(((A - B) ** 2).sum(-1))