print('\n', title)
X = np.random.uniform(0, 1, size=(nx, dim))
Y = np.random.uniform(0, 1, size=(ny, dim))
dist = cdist(X, Y, metric=metric)
print('scipy.spatial.distance.cdist: X %s Y %s -> %s' % (X.shape, Y.shape,
    dist.shape))
print('dist average %.3g +- %.2g' % (dist.mean(), dist.std()))
print('check: dist[0,3] %.3g == cdist( [X[0]], [Y[3]] ) %.3g' % (dist[0, 3],
    cdist([X[0]], [Y[3]])))
Euclidean distance between points in two different Numpy arrays, not within