Prior from a 2D histogram

Just in case it saves you some trouble, you only need the random method if you want to do prior or posterior predictive sampling. If all you need is the posterior trace (what you get with pm.sample()), it’s fine to only define the logp method.