@numba.jit(nopython=True, nogil=True, parallel=True)
def _numba_add(xx, yy, nn, cinf, x, y, z, w, typ, zw, varw, ww):
    '\n    numba jit compiled add function\n\n    - Numba compiles this function, ensure that no classes/functions are within unless they are also numba-ized\n    - Numba.prange forces numba to parallelize, generates exception when parallelism fails, helping you figure out\n        what needs to be fixed.  Otherwise parallel=True can fail silently\n    - nopython=True, this function operates entirely outside of the python interpreter\n    - nogil=True, will not use the python GIL (this might be redundant with nopython)\n\n    '
    grows = yy.size
    gcols = xx.size
    doindices = 0
    cinf2 = (cinf ** 2)
    for idx in numba.prange(grows):
        ddy = ((y - yy[idx]) ** 2)
        yidx = np.flatnonzero((ddy < cinf2))
        if (yidx.size == 0):
            continue
        xtest = (cinf2 - ddy[yidx])
        for jdx in numba.prange(gcols):
            xidx = np.flatnonzero((((x[yidx] - xx[jdx]) ** 2) < xtest))
            if (xidx.size == 0):
                continue
            II = yidx[xidx]
            if (typ == 'dwm'):
                if (w.size != 1):
                    R = ((((xx[jdx] - x[II]) ** 2) + ((yy[idx] - y[II]) ** 2)) ** (w[II] / 2.0))
                else:
                    R = ((((xx[jdx] - x[II]) ** 2) + ((yy[idx] - y[II]) ** 2)) ** (w / 2.0))
            if (not doindices):
                nn[(idx, jdx)] = np.nansum(np.array([nn[(idx, jdx)], xidx.size]))
            else:
                nn[(idx, jdx)] = ((idx * (gcols - 1)) + jdx)
            if (w.size != 1):
                chunk_w = w[II]
            else:
                chunk_w = w
            if (typ == 'mean'):
                (zw[(idx, jdx)], ww[(idx, jdx)], varw[(idx, jdx)]) = _numba_mean_by_cell(zw[(idx, jdx)], ww[(idx, jdx)], varw[(idx, jdx)], nn[(idx, jdx)], z[II], chunk_w)
            elif (typ == 'median'):
                (zw[(idx, jdx)], ww[(idx, jdx)], varw[(idx, jdx)]) = _numba_median_by_cell(zw[(idx, jdx)], ww[(idx, jdx)], varw[(idx, jdx)], z[II])
    return (zw, ww, varw, nn)
numba jit compiled add function

- Numba compiles this function, ensure that no classes/functions are within unless they are also numba-ized
- Numba.prange forces numba to parallelize, generates exception when parallelism fails, helping you figure out
    what needs to be fixed.  Otherwise parallel=True can fail silently
- nopython=True, this function operates entirely outside of the python interpreter
- nogil=True, will not use the python GIL (this might be redundant with nopython)
@numba.jit(nopython=True, nogil=True, parallel=True)
def _numba_add(xx, yy, nn, cinf, x, y, z, w, typ, zw, varw, ww):
    '\n    numba jit compiled add function\n\n    - Numba compiles this function, ensure that no classes/functions are within unless they are also numba-ized\n    - Numba.prange forces numba to parallelize, generates exception when parallelism fails, helping you figure out\n        what needs to be fixed.  Otherwise parallel=True can fail silently\n    - nopython=True, this function operates entirely outside of the python interpreter\n    - nogil=True, will not use the python GIL (this might be redundant with nopython)\n\n    '
    grows = yy.size
    gcols = xx.size
    doindices = 0
    cinf2 = (cinf ** 2)
    for idx in numba.prange(grows):
        ddy = ((y - yy[idx]) ** 2)
        yidx = np.flatnonzero((ddy < cinf2))
        if (yidx.size == 0):
            continue
        xtest = (cinf2 - ddy[yidx])
        for jdx in numba.prange(gcols):
            xidx = np.flatnonzero((((x[yidx] - xx[jdx]) ** 2) < xtest))
            if (xidx.size == 0):
                continue
            II = yidx[xidx]
            if (typ == 'dwm'):
                if (w.size != 1):
                    R = ((((xx[jdx] - x[II]) ** 2) + ((yy[idx] - y[II]) ** 2)) ** (w[II] / 2.0))
                else:
                    R = ((((xx[jdx] - x[II]) ** 2) + ((yy[idx] - y[II]) ** 2)) ** (w / 2.0))
            if (not doindices):
                nn[(idx, jdx)] = np.nansum(np.array([nn[(idx, jdx)], xidx.size]))
            else:
                nn[(idx, jdx)] = ((idx * (gcols - 1)) + jdx)
            if (w.size != 1):
                chunk_w = w[II]
            else:
                chunk_w = w
            if (typ == 'mean'):
                (zw[(idx, jdx)], ww[(idx, jdx)], varw[(idx, jdx)]) = _numba_mean_by_cell(zw[(idx, jdx)], ww[(idx, jdx)], varw[(idx, jdx)], nn[(idx, jdx)], z[II], chunk_w)
            elif (typ == 'median'):
                (zw[(idx, jdx)], ww[(idx, jdx)], varw[(idx, jdx)]) = _numba_median_by_cell(zw[(idx, jdx)], ww[(idx, jdx)], varw[(idx, jdx)], z[II])
    return (zw, ww, varw, nn)