Can I make out-of-sample predictions using posterior means? Or how to use scipy.optimize with pymc predictions?

One can also use the mean of the observed variable: pymc/pymc/distributions/moments/means.py at main · pymc-devs/pymc · GitHub

We could probably add the variance if interested in considering that in the optimization