Custom sampling step

Thanks. Yes I ended up doing just that (it occurred to me as I was writing), and that’s a reasonable solution.
As far as pymc v4, I encountered this example:

But it is certainly more involved than just subclassing the BlockedStep class with a vars attribute and a step method. It involves ArrayStepShared and RaveledVars classes, and half a dozen pymc functions and methods. I’d be curious to understand what it does, and what the differences are with the pymc3 example here. (Maybe it does solve the constrained variable issue?)