Suppose we have a matrix A composed of m vectors with n dimensions.
And suppose we want to get the averaged Euclidean distance between all of those vectors. I know how to do this in for loops but I am not quite as clear for matrix operations.
I see someone posed the question here and received an answer:
Average distance in distance matrix - Cross Validated
How would this be implemented in Pytorch as a matrix operation?
Additionally, how would it need to be modified if the matrix is complex(i.e. torch.cfloat)?