I would use sklearn.metrics.pairwise.euclidean_distances