The solution is in the error message - use np.array(H_signal) if you need a boolean value. pm.math.switch is expecting something it can use as a tensor variable.
That said, I’m pretty sure you could vectorise your calculations instead of iterating over the rows, which should be cleaner and would avoid this issue because you’d pass in a column vector of booleans instead of a single value. I have a suspicion iterating won’t work the way you’re expecting, because the shape of final_thetaH and final_thetaA won’t match a single value.
Looks like it’ll be an interesting model once you’ve got it going