[SciPy-dev] ERROR: Tests pdist(X, 'cosine') on the Iris data set.
Damian Eads
eads@soe.ucsc....
Wed Jun 4 03:12:55 CDT 2008
Nils Wagner wrote:
> Hi All,
>
> Can someone reproduce the following error with
>>>> scipy.__version__
> '0.7.0.dev4411'
>>>> numpy.__version__
> '1.2.0.dev5252'
>
> ======================================================================
> ERROR: Tests pdist(X, 'cosine') on the Iris data set.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/data/home/nwagner/local/lib/python2.5/site-packages/scipy/cluster/tests/test_hierarchy.py",
> line 264, in test_pdist_cosine_iris
> Y_test1 = pdist(X, 'cosine')
> File
> "/data/home/nwagner/local/lib/python2.5/site-packages/scipy/cluster/hierarchy.py",
> line 1478, in pdist
> dm = squareform(dm)
> File
> "/data/home/nwagner/local/lib/python2.5/site-packages/scipy/cluster/hierarchy.py",
> line 766, in squareform
> raise ValueError('The distance matrix array must be
> symmetrical.')
> ValueError: The distance matrix array must be symmetrical.
>
> Nils
Sorry about that. This is a fairly new test in a new module so I'm still
ironing out numerical differences between architectures. Although, I was
not able to reproduce the error, I believe reverting back to the C
implementation of pdist(*, 'cosine') instead of the vectorized version
might fix the problem. I just committed the change (4412).
Damian
More information about the Scipy-dev
mailing list