[SciPy-User] inverting pdist.

Éric Depagne eric@depagne....
Mon Apr 16 09:55:03 CDT 2012


I'm using scipy.spatial.distance.pdist.

I was wondering if it was possible to invert the result to get the elements of 
the input matrix that produced a given result.
Let me explain a little.

Say  we have a,b, c and d. The possible distances are ab, ac, ad,  bc, bd and 
cd. pdist will give the values for those 6 distances. Say the largest is at 
index 5. How can I get from the pdist result array that it is the bd distance?

And if it is not, is there another way of doing so? My data are such that I 
have close to 100k distances to compute.


Un clavier azerty en vaut deux
Éric Depagne                            eric@depagne.org

More information about the SciPy-User mailing list