There are many distributions in scipy.stats. They come with logpdf, cdf, logcdf, etc. Make these available via a few standard Ops.