I think you could add this to test_kernels.py in the main statsmodels.nonparametrics.tests directory instead of the sandbox,
because it's used in KDEUnivariate and to keep the unit tests together