This is a fast Python implementation of
Inverse Transform Sampling for an arbitrary probability distribution. Generating 10
6 random numbers with this crazy probability density function takes ~150 ms on a i5-3320M CPU @ 2.6 GHz, most of it from
scipy.interpolate.interp1d.