Creating A custom step function

q0 is a RaveledVars in this case, which is the concatenate+flatten representation of the free parameter return by PyMC internal during sampling. You should be using this indeed.