Thanks @ricardoV94 But don’t I need the Deterministic calls so that pymc doesn’t think probs, weighted_pdf_2d and mu_pdf are random variables that need to be sampled? Or are you saying to do
mvn = pm.MvNormal.dist(mu=mu_vector,chol=chol)
probs = pt.exp(pm.logp(mvn,points_tensor))
weighted_pdf_2d = pt.tensordot(pdfs_2d,probs,axes=1).reshape((20,20))
mu_pdf = weighted_pdf_2d / (pt.sum(weighted_pdf_2d) * bin_area)
I don’t need any of those in my final trace – but why would Deterministic slow down sampling a lot?
I’m not getting blas warnings anymore (I was at some point getting WARNING (pytensor.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
right after doing import pymc as pm
but I reinstalled and that warning doesn’t show up anymore).