Using PyTensor.scan to loop over multidimensional array

Okay thank you!
I’ll have a look at both versions…