title: Advice on Speeding up SciPy Custom Distribution Sampling & Fitting
body: <p>I am trying to fit a custom distribution to a large (~O(500,000) measurements) dataset using scipy. I have derived a theoretical PDF based on some other factors, but both by hand and using symbolic integration software I cannot find an exact form of the CDF.</p>
  
  <p>Currently, simply evaluating 1000 random samples from my custom distribution is expensive, which I believe is due to the need to invert an unknown CDF. If I cannot find an explicit form of the CDF and it's inverse, is there anything else I can do to speed up usage of this distribution?</p>
  
  <p>I've used maple, matlab and Sympy to try and determine a CDF, yet none give a result. I also tried down-sampling my data whilst still retaining the tail attributes, but this still required so much data that doing anything with the distribution was slow.</p>
  
  <p>My distribution is a sub-class of SciPy's rv_continuous class.</p>
  
  <p>Thanks for any advice.</p>