scipy/scipy — pull request #2602 by hokinus (2013-06-26 02:45:28+00:00)
Title: Test and fix for wrong result of spatial.cKDTree.sparse_distance_matrix

First: cKDTree.sparse_distance_matrix was using wrong indexes to construct distance matrix. It was not caught in test case, because the search radius was to small. Fixed bug and changed radius in test case.

Second: After fixing above the results of KDTree and cKDTree.sparse_distance_matrix still weren't matching because KDTree reported distance and cKDTree distance**2. Fixed and added test for consistency between KDTree and cKDTree.sparse_distance_matrix.