def sort_data(self):
    ' Determine which data contributes to each grid node.\n        The list of indices is populated in self._I[n][m], where n and m\n        indicate the grid node.'
    self._I = [x[:] for x in ([([None] * self.xx.size)] * self.yy.size)]
    cinf2 = (self.cinf ** 2)
    for idx in np.arange(0, self.yy.size, dtype='uint32'):
        '\n            We need to search through all the data efficiently to determine\n            indices for points that will contribute to a grid node. Those that\n            contribute are ones that fall within the "cell influence" (cinf).\n            Thse are the ones that meet the criteria:\n\n            sqrt( (x-xo).^2 + (y-yo).^2 ) < cinf\n\n            Squaring both sides....\n\n            (x-xo)^2 + (y-yo)^2 < cinf^2\n\n            This will never be true when either term of the lhs is >= cinf^2.\n            So we reduce the search by doing these piece-meal. '
        ddy = ((self._y - self.yy[idx]) ** 2)
        yidx = np.flatnonzero((ddy < cinf2))
        if (yidx.size == 0):
            continue
        xtest = (cinf2 - ddy[yidx])
        for jdx in np.arange(0, self.xx.size, dtype='uint32'):
            xidx = np.flatnonzero((((self._x[yidx] - self.xx[jdx]) ** 2) < xtest))
            if (xidx.size == 0):
                continue
            self._I[idx][jdx] = yidx[xidx]
            self.nn[(idx, jdx)] = np.nansum(np.append(self.nn[(idx, jdx)], xidx.size))
Determine which data contributes to each grid node.
The list of indices is populated in self._I[n][m], where n and m
indicate the grid node.
def sort_data(self):
    ' Determine which data contributes to each grid node.\n        The list of indices is populated in self._I[n][m], where n and m\n        indicate the grid node.'
    self._I = [x[:] for x in ([([None] * self.xx.size)] * self.yy.size)]
    cinf2 = (self.cinf ** 2)
    for idx in np.arange(0, self.yy.size, dtype='uint32'):
        '\n            We need to search through all the data efficiently to determine\n            indices for points that will contribute to a grid node. Those that\n            contribute are ones that fall within the "cell influence" (cinf).\n            Thse are the ones that meet the criteria:\n\n            sqrt( (x-xo).^2 + (y-yo).^2 ) < cinf\n\n            Squaring both sides....\n\n            (x-xo)^2 + (y-yo)^2 < cinf^2\n\n            This will never be true when either term of the lhs is >= cinf^2.\n            So we reduce the search by doing these piece-meal. '
        ddy = ((self._y - self.yy[idx]) ** 2)
        yidx = np.flatnonzero((ddy < cinf2))
        if (yidx.size == 0):
            continue
        xtest = (cinf2 - ddy[yidx])
        for jdx in np.arange(0, self.xx.size, dtype='uint32'):
            xidx = np.flatnonzero((((self._x[yidx] - self.xx[jdx]) ** 2) < xtest))
            if (xidx.size == 0):
                continue
            self._I[idx][jdx] = yidx[xidx]
            self.nn[(idx, jdx)] = np.nansum(np.append(self.nn[(idx, jdx)], xidx.size))