I'm trying to find the shortest distance between 2 kd trees and am using the scipy function 'sparse_distance_matrix'. The result is returned in a dictionary of keys matrix of the form {(1,2):4.54}
.
Its possible to retrieve the value using the following code but no method seems to work to get the key value since its in tuple form
sparsemin = sp.KDTree.sparse_distance_matrix(aKD,bKD,20)
m = min(sparsemin.itervalues())