Changed kde computation to use scipy.spatial.distance.cdist.