[SciPy-user] problem with spatial.kdtree.sparse_distance_matrix
Sat Feb 21 11:38:09 CST 2009
On Sat, Feb 21, 2009 at 12:03 PM, Anne Archibald
> 2009/2/20 <email@example.com>:
>> On Fri, Feb 20, 2009 at 5:09 PM, <firstname.lastname@example.org> wrote:
>>> I would like to get the distance_matrix of all point in a 2d array,
>>> but it looks like kdtree cannot create a sparse distance matrix with
>>> itself. Is this intentional, a bug, or am I doing something wrong?
>>> Using a small distortion in the data works.
>>> I followed the example in the testfile (BTW: in class
>>> test_sparse_distance_matrix, M is often empty in the examples I tried,
>>> with given r=0.3).
>> The problem is more general:
>> KDTree.sparse_distance_matrix fails when there are zero distance
>> points in the two trees, even if they are otherwise different.
> This was actually a bug in dok_matrix (setting an already-zero element
> to zero failed), which is now fixed in SVN.
thank you, I will try it out soon.
More information about the SciPy-user