Mmm I think this is important to clear up because cogent's code is semantically wrong ("E_matrix[i,j] gets subtracted the means of column i and row j instead of the row i and column j") but that's OK if the distance matrix is symmetric.