def sort_data_kdtree(self):
    ' A sorting of the data into grid cells using KDtrees.'
    tree = spatial.cKDTree(list(zip(self._x.ravel(), self._y.ravel())), leafsize=10000000.0)
    (xxx, yyy) = np.meshgrid(self.xx, self.yy)
    indexes = tree.query_ball_point(np.vstack((xxx.ravel(), yyy.ravel())).T, r=self.cinf, p=2, n_jobs=(- 1)).reshape(xxx.shape)
    self._I = indexes
A sorting of the data into grid cells using KDtrees.
def sort_data_kdtree(self):
    ' '
    tree = spatial.cKDTree(list(zip(self._x.ravel(), self._y.ravel())), leafsize=10000000.0)
    (xxx, yyy) = np.meshgrid(self.xx, self.yy)
    indexes = tree.query_ball_point(np.vstack((xxx.ravel(), yyy.ravel())).T, r=self.cinf, p=2, n_jobs=(- 1)).reshape(xxx.shape)
    self._I = indexes