Efficient Distance Matrix Computation

You can have a look at the source code in NumPy device functions (formerly CUDA compatible dist_matrix) by sgbaird · Pull Request #7377 · numba/numba · GitHub. I’m still working on where to host the code.

See GitHub - sparks-baird/dist-matrix: Fast Numba-enabled CPU and GPU computations of Earth Mover's (scipy.stats.wasserstein_distance) and Euclidean distances.