I have a N*M matrix of images where each row of M values represents a vector. I would like to compare these vectors with each other for which I am using pdist method as shown below. This method returns a 1-D tensor and I am not able find the index of any 2 vectors that matched completely (distance = 0). Is there a way I can get a N*N matrix from this 1-D array?

```
a = torch.nn.functional.pdist(torch.rand(10, 10), p=2)
(a == 0).nonzero(as_tuple=True)[0]
```