SciPy-based kd-tree with periodic boundary conditions