13 Jan
2015
13 Jan
'15
12:20 p.m.
Hello, It's my first use of the distance function from scipy.spatial, and I wonder if there is an error in the docstring of pdist: http://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.spatial.dis... (same thing for cdist) [...] Returns ------- Y : ndarray Returns a condensed distance matrix Y. For each :math:`i` and :math:`j` (where :math:`i<j<n`), the metric ``dist(u=X[i], v=X[j])`` is computed and stored in entry ``ij``. [...] Is this indeed the entry i*j ? Because the docstring of squareform says : [...] The X[i, j] and X[j, i] values are set to v[{n \choose 2}-{n-i \choose 2} + (j-u-1)] [...] best, Pierre