Something changed in `pytensor > 2.12.3` (and thus `pymc > 5.6.1`) that makes my `pytensor.gradient.grad` call get stuck - any ideas?

Using scan is a good idea - thanks :slight_smile: I’ll have to try a few things tomorrow. There’s potentially precedent here but I need to work through it to understand more…

At the moment it’s not especially obvious to me why gradient.jacobian(expression, wrt, ... expects expression as a 1D, rather than handing larger dims. Possibly combinatoric expansion?