kde.py: Implements first and 2nd order kernels on 1 and 2 dimensions.