Problem with DiscreteUniform giving indices out of bounds

I’m having trouble replicating the model without the values you’re using, but with nTemp=3, padding=1 and some mock data from np.random.rand I’m getting chain failures, not out of bounds errors, when using predicted = xpred[idx0]*10.**em[0] + xpred[idx1]*10.**em[1] + xpred[idx2]*10.**em[2]. d2 gives me constant values of 2, which matches the dimensions of pred.

If I change to padding=0 I get out of bounds errors. I think the problem is in your nTemp and padding values