Image.resize((1,1), resample=PIL.Image.LANCZOS, box=None)
import numpy as np
from scipy.spatial.distance import cdist
many_arrays=np.array([[1, 2, 3],[4, 5, 6]])
many_arrays2=np.array([[1, 2, 3],[4, 5, 6]])
print(cdist(many_arrays, many_arrays2))
[[0. 5.19615242]
[5.19615242 0. ]]