Distance matrix A is A, B, as was clustering sample points,
If you want to from A distance between each sample point in B,
In my experiments many need similar operations, I adopted two for loop, cause the efficiency is very low, some of the 1 w since data sets can run to more than 20 minutes,
I myself have tried many ways to optimize and asked to know, such as in the classmate, but still failed to solve this problem,
Want to ask, what is the way to optimize the efficiency?