import numpy as np
import scipy
a = np.random.normal(size=(10, 3))
b = np.random.normal(size=(1, 3))
dist = scipy.spatial.distance.cdist(a, b)
Efficient distance calculation between N points and a reference in numpy/scipy