Instead of `distances`, you could use `affinity` which is already used in `SpectralEmbedding`, `AffinityPropagation`, etc...