Refactored evaluation of KDE.  Optionally permitted specifying tolerance to imporve speed.  Used nditer for more flexible implementation.
TODO: cast iterator output to float, to avoid returning zeroes when an integer is supplied.
TODO: test the KDE.