title: use emcee to sample probability distribution functions?
body: <p>I have two arrays (pdf_#), each containing the probability for a parameter (val_#). How can I sample from these distributions to create a joint posterior distribution (i.e. like in the <a href="http://corner.readthedocs.io/en/latest/pages/quickstart.html" rel="nofollow noreferrer">corner plot here</a>)? For emcee it looks like I can only pass functions to be sampled from, not arrays.</p>
  
  <p>Here is what I have:</p>
  
  <pre><code>pdf_1 = [.1, .1, .25, .3, .15]
  pdf_2 = [.25, .3, .2, .1, .4]
  
  val_1 = [2, 3, 4, 5, 6]
  val_2 = [1, 2, 3 ,4 ,5]
  </code></pre>
  
  <p>(in reality the pdfs are sampled more finely, and sum to 1)</p>
  
  <p>I would like to generate N numbers of samples (with x,y from val_1,val_2) following the pdfs.</p>