Given some tensor of input samples of the shape (n_samples, n_features), what’s the best way to calculate a matrix with the shape (n_samples, n_samples) where the element e_{i,j} contains the dot product of the samples with the indices i and j?